@marimo-team/frontend 0.12.9-dev19 → 0.12.9-dev21
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-B3EGe3J7.js → ConnectedDataExplorerComponent-B191HGGz.js} +1 -1
- package/dist/assets/VegaLite-CGPTuZm8.js +11 -0
- package/dist/assets/{_baseEach-BLu58TpK.js → _baseEach-DlpS-WrN.js} +1 -1
- package/dist/assets/_baseMap-D7MvHS12.js +1 -0
- package/dist/assets/_baseUniq-BcJ9YZpb.js +1 -0
- package/dist/assets/{any-language-editor-B9rOPYPE.js → any-language-editor-BSBsWFxN.js} +1 -1
- package/dist/assets/{arc-B5qYPUYs.js → arc-cUKDg37C.js} +1 -1
- package/dist/assets/architectureDiagram-IEHRJDOE-CI6g0CKR.js +1 -0
- package/dist/assets/blockDiagram-JOT3LUYC-Bggthd-f.js +1 -0
- package/dist/assets/c4Diagram-VJAJSXHY-PNGc3wkf.js +1 -0
- package/dist/assets/channel-ulJNqs9o.js +1 -0
- package/dist/assets/{chart-spec-C0kzZLp0.js → chart-spec-BNhKJote.js} +1 -1
- package/dist/assets/{chunk-4BMEZGHF-BiuHmakw.js → chunk-4BMEZGHF-D7SKFMJ1.js} +1 -1
- package/dist/assets/{chunk-A2AXSNBT-Bcf0SaXI.js → chunk-A2AXSNBT-BV5UmCCD.js} +1 -1
- package/dist/assets/{chunk-AEK57VVT-CFa_0aNx.js → chunk-AEK57VVT-B1_20kr6.js} +1 -1
- package/dist/assets/{chunk-D6G4REZN-Q6ZzHVis.js → chunk-D6G4REZN-DfUuspQK.js} +1 -1
- package/dist/assets/{chunk-RZ5BOZE2-Djj4U8sI.js → chunk-RZ5BOZE2-BKeKV9Yg.js} +1 -1
- package/dist/assets/{chunk-XZIHB7SX-Cdpy_Cfu.js → chunk-XZIHB7SX-Fnv__-wk.js} +1 -1
- package/dist/assets/circle-play-b29_CgIh.js +7 -0
- package/dist/assets/classDiagram-GIVACNV2-BarjTkYU.js +1 -0
- package/dist/assets/classDiagram-v2-COTLJTTW-BarjTkYU.js +1 -0
- package/dist/assets/clone-EBNMYT_U.js +1 -0
- package/dist/assets/compile-CjDDBz06.js +1 -0
- package/dist/assets/dagre-OKDRZEBW-CLvKz_qH.js +1 -0
- package/dist/assets/{data-editor-CpGf0n9O.js → data-editor-efTvcVjg.js} +1 -1
- package/dist/assets/diagram-SSKATNLV-WGgEVNVJ.js +1 -0
- package/dist/assets/diagram-VNBRO52H-BeYlKxGc.js +1 -0
- package/dist/assets/edit-page-gwC5o-r0.js +8 -0
- package/dist/assets/erDiagram-Q7BY3M3F-C670KnJ4.js +1 -0
- package/dist/assets/flowDiagram-4HSFHLVR-B18AXW0m.js +1 -0
- package/dist/assets/ganttDiagram-APWFNJXF-B831VkZm.js +1 -0
- package/dist/assets/gitGraphDiagram-7IBYFJ6S-CCz7Aqo7.js +1 -0
- package/dist/assets/{graph-BcYKg7pg.js → graph-DwVqkZok.js} +1 -1
- package/dist/assets/{home-page-nIUiVNCT.js → home-page-Dz3brA23.js} +2 -2
- package/dist/assets/{index-DjngPZbO.js → index-B-n2pVie.js} +1 -1
- package/dist/assets/index-B6ITZO6j.js +1 -0
- package/dist/assets/{index-QV1pM6V_.js → index-BByXE7o-.js} +4 -4
- package/dist/assets/{index-YjdcYS-W.js → index-Bm6xzdGF.js} +1 -1
- package/dist/assets/{index-C-K9DKwk.js → index-BwCEkOAi.js} +1 -1
- package/dist/assets/{index-CL7YXglf.js → index-CJzh4HrJ.js} +1 -1
- package/dist/assets/{index-DAw1AjBa.js → index-CQA_XCsI.js} +1 -1
- package/dist/assets/{index-_3GL5h1l.js → index-CkHg9kyA.js} +1 -1
- package/dist/assets/{index-xIkdt3qu.js → index-CsqRF1m8.js} +1 -1
- package/dist/assets/{index-BEUyRhH6.js → index-CuF4FnZ1.js} +1 -1
- package/dist/assets/{index-CMkaK8j3.js → index-D-6Kr2cw.js} +1 -1
- package/dist/assets/{index-DnUjB-_u.js → index-DXtofrS7.js} +1 -1
- package/dist/assets/{index-BMoKnSBv.js → index-DZKYx8U2.js} +1 -1
- package/dist/assets/{index-DCbocATP.js → index-D_g5F5hC.js} +1 -1
- package/dist/assets/{index-C95fxStd.js → index-dSqegs-o.js} +1 -1
- package/dist/assets/{index-piyT1ib6.js → index-eyMGFTC5.js} +1 -1
- package/dist/assets/{index-Bkwg-3Fb.js → index-uR40bDrI.js} +1 -1
- package/dist/assets/infoDiagram-PH2N3AL5-C1S52K4b.js +1 -0
- package/dist/assets/journeyDiagram-U35MCT3I-HFskJQK3.js +1 -0
- package/dist/assets/kanban-definition-NDS4AKOZ-DewmnCGw.js +1 -0
- package/dist/assets/{layout-162YDsiA.js → layout-BMFrITX8.js} +1 -1
- package/dist/assets/linear-xO0ooyuf.js +1 -0
- package/dist/assets/mermaid-C9RzdJLD.js +7 -0
- package/dist/assets/min-C6bmNa9O.js +1 -0
- package/dist/assets/mindmap-definition-ALO5MXBD-DRjqKp6F.js +1 -0
- package/dist/assets/pieDiagram-IB7DONF6-BxEBQ6MB.js +1 -0
- package/dist/assets/quadrantDiagram-7GDLP6J5-BzywN9U8.js +1 -0
- package/dist/assets/{radar-MK3ICKWK-DZtMJyk-.js → radar-MK3ICKWK-CD07te9f.js} +1 -1
- package/dist/assets/{react-plotly-KdZbKIdl.js → react-plotly-C4noI9OY.js} +1 -1
- package/dist/assets/requirementDiagram-KVF5MWMF-Bt4IBv9z.js +1 -0
- package/dist/assets/run-page-DxBt3NGx.js +1 -0
- package/dist/assets/sankeyDiagram-QLVOVGJD-olvnQKcC.js +1 -0
- package/dist/assets/sequenceDiagram-X6HHIX6F-BG-o81pS.js +1 -0
- package/dist/assets/{slides-component-Dwng0ybG.js → slides-component-BXnuKabl.js} +1 -1
- package/dist/assets/sortBy-DfNIFBIy.js +1 -0
- package/dist/assets/stateDiagram-DGXRK772-DNMTptZP.js +1 -0
- package/dist/assets/stateDiagram-v2-YXO3MK2T-CPrzCO8n.js +1 -0
- package/dist/assets/step-5BjdtTEt.js +1 -0
- package/dist/assets/{terminal-BzjaEUjW.js → terminal-BD7YO0CH.js} +1 -1
- package/dist/assets/time-os0SVE4b.js +1 -0
- package/dist/assets/timeline-definition-BDJGKUSR-BhPo8zNN.js +1 -0
- package/dist/assets/timer-DFzT7np-.js +1 -0
- package/dist/assets/tracing-a0BMXzgo.js +8 -0
- package/dist/assets/transform-DjHZbYKP.js +1 -0
- package/dist/assets/tree-BUgsinvP.js +8 -0
- package/dist/assets/{useMarimoWebSocket-c24mYV70.js → useMarimoWebSocket-BtHu1OXm.js} +4 -4
- package/dist/assets/vega-component-TS37cPmp.js +1 -0
- package/dist/assets/xychartDiagram-VJFVF3MP-Oq6axxRl.js +1 -0
- package/dist/assets/zoom-COrs4lFh.js +1 -0
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/VegaLite-C4jc3DbR.js +0 -11
- package/dist/assets/_baseMap-BwlisKUj.js +0 -1
- package/dist/assets/_baseUniq-CsVuRotB.js +0 -1
- package/dist/assets/architectureDiagram-IEHRJDOE-C5pFW9R1.js +0 -1
- package/dist/assets/blockDiagram-JOT3LUYC-BQnwS7p_.js +0 -1
- package/dist/assets/c4Diagram-VJAJSXHY-D4Eiiy_a.js +0 -1
- package/dist/assets/channel-BGLVWyn_.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-BUkoA7Gg.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-BUkoA7Gg.js +0 -1
- package/dist/assets/clone-C8tCSJw7.js +0 -1
- package/dist/assets/compile-Bx_JarK2.js +0 -1
- package/dist/assets/dagre-OKDRZEBW-CkfGT-nJ.js +0 -1
- package/dist/assets/diagram-SSKATNLV-DQOATu41.js +0 -1
- package/dist/assets/diagram-VNBRO52H-C7wk6q1b.js +0 -1
- package/dist/assets/edit-page-C0wf4QXz.js +0 -8
- package/dist/assets/erDiagram-Q7BY3M3F-yyrvC-Az.js +0 -1
- package/dist/assets/flowDiagram-4HSFHLVR-Cegcb0W3.js +0 -1
- package/dist/assets/ganttDiagram-APWFNJXF-D9rummay.js +0 -1
- package/dist/assets/gitGraphDiagram-7IBYFJ6S-BBF9xrIU.js +0 -1
- package/dist/assets/index-Hcm6vytW.js +0 -1
- package/dist/assets/infoDiagram-PH2N3AL5-BUSS-YRa.js +0 -1
- package/dist/assets/journeyDiagram-U35MCT3I-DHtAwSAd.js +0 -1
- package/dist/assets/kanban-definition-NDS4AKOZ-BQLBJIYX.js +0 -1
- package/dist/assets/linear-CVoZ1MzX.js +0 -1
- package/dist/assets/mermaid-iAIjIGjg.js +0 -7
- package/dist/assets/min-BGi6L9wq.js +0 -1
- package/dist/assets/mindmap-definition-ALO5MXBD-B362nwlW.js +0 -1
- package/dist/assets/pieDiagram-IB7DONF6-kBXvdhdj.js +0 -1
- package/dist/assets/quadrantDiagram-7GDLP6J5-Dzv0VN2o.js +0 -1
- package/dist/assets/requirementDiagram-KVF5MWMF-D7Z4Eian.js +0 -1
- package/dist/assets/run-page-DUHz4-c7.js +0 -1
- package/dist/assets/sankeyDiagram-QLVOVGJD-D2NZz1SK.js +0 -1
- package/dist/assets/sequenceDiagram-X6HHIX6F-ByZmhmvp.js +0 -1
- package/dist/assets/sortBy-BvAVG72A.js +0 -1
- package/dist/assets/stateDiagram-DGXRK772-CRoRZtnB.js +0 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-C8bmtTGw.js +0 -1
- package/dist/assets/step-xJWGRC3d.js +0 -1
- package/dist/assets/time-BGc4EDHL.js +0 -1
- package/dist/assets/timeline-definition-BDJGKUSR-BYOVXsNp.js +0 -1
- package/dist/assets/transform-CdY8z5kT.js +0 -1
- package/dist/assets/tree-c5ZvjiS5.js +0 -8
- package/dist/assets/vega-component-g-u_DEsv.js +0 -1
- package/dist/assets/xychartDiagram-VJFVF3MP-BbT-LZTy.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{G as r,ap as a,bM as n,bN as t,q as o,O as s,bO as e,ak as u,al as i,bP as l,aj as f,an as v}from"./index-QV1pM6V_.js";import{a as c}from"./_baseEach-BLu58TpK.js";import{d as b}from"./_baseUniq-CsVuRotB.js";import{b as p}from"./_baseMap-BwlisKUj.js";var h=Object.prototype,m=h.hasOwnProperty,d=r((function(r,o){r=Object(r);var s=-1,e=o.length,u=e>2?o[2]:void 0;for(u&&a(o[0],o[1],u)&&(e=1);++s<e;)for(var i=o[s],l=n(i),f=-1,v=l.length;++f<v;){var c=l[f],b=r[c];(void 0===b||t(b,h[c])&&!m.call(r,c))&&(r[c]=i[c])}return r}));function j(r){var a=null==r?0:r.length;return a?r[a-1]:void 0}var O=Math.max;var g,y=(g=function(r,a,n){var t=null==r?0:r.length;if(!t)return-1;var o=null==n?0:e(n);return o<0&&(o=O(t+o,0)),b(r,c(a),o)},function(r,a,n){var t=Object(r);if(!o(r)){var e=c(a);r=s(r),a=function(r){return e(t[r],r,t)}}var u=g(r,a,n);return u>-1?t[e?r[u]:u]:void 0});function x(r,a){return(i(r)?u:p)(r,c(a))}var M=Object.prototype.hasOwnProperty;function P(r,a){return null!=r&&M.call(r,a)}function _(r,a){return null!=r&&l(r,a,P)}function q(r,a){return r<a}function w(r,a,n){for(var t=-1,o=r.length;++t<o;){var s=r[t],e=a(s);if(null!=e&&(void 0===u?e==e&&!f(e):n(e,u)))var u=e,i=s}return i}function k(r){return r&&r.length?w(r,v,q):void 0}export{q as a,w as b,k as c,d,y as f,_ as h,j as l,x as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as t,l as e,c as n,I as i,S as r,G as o,h as s,T as a,V as h,W as l,a3 as c,O as g}from"./mermaid-iAIjIGjg.js";import{c as u}from"./cytoscape.esm-bH-fs5wT.js";import{v as d}from"./index-QV1pM6V_.js";import{s as p}from"./transform-CdY8z5kT.js";import"./step-xJWGRC3d.js";var f,y={exports:{}},E={exports:{}},m={exports:{}};function _(){return f?m.exports:(f=1,t=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=26)}([function(t,e,n){function i(){}i.QUALITY=1,i.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,i.DEFAULT_INCREMENTAL=!1,i.DEFAULT_ANIMATION_ON_LAYOUT=!0,i.DEFAULT_ANIMATION_DURING_LAYOUT=!1,i.DEFAULT_ANIMATION_PERIOD=50,i.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,i.DEFAULT_GRAPH_MARGIN=15,i.NODE_DIMENSIONS_INCLUDE_LABELS=!1,i.SIMPLE_NODE_SIZE=40,i.SIMPLE_NODE_HALF_SIZE=i.SIMPLE_NODE_SIZE/2,i.EMPTY_COMPOUND_NODE_SIZE=40,i.MIN_EDGE_LENGTH=1,i.WORLD_BOUNDARY=1e6,i.INITIAL_WORLD_BOUNDARY=i.WORLD_BOUNDARY/1e3,i.WORLD_CENTER_X=1200,i.WORLD_CENTER_Y=900,t.exports=i},function(t,e,n){var i=n(2),r=n(8),o=n(9);function s(t,e,n){i.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=t,this.target=e}for(var a in s.prototype=Object.create(i.prototype),i)s[a]=i[a];s.prototype.getSource=function(){return this.source},s.prototype.getTarget=function(){return this.target},s.prototype.isInterGraph=function(){return this.isInterGraph},s.prototype.getLength=function(){return this.length},s.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},s.prototype.getBendpoints=function(){return this.bendpoints},s.prototype.getLca=function(){return this.lca},s.prototype.getSourceInLca=function(){return this.sourceInLca},s.prototype.getTargetInLca=function(){return this.targetInLca},s.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},s.prototype.getOtherEndInGraph=function(t,e){for(var n=this.getOtherEnd(t),i=e.getGraphManager().getRoot();;){if(n.getOwner()==e)return n;if(n.getOwner()==i)break;n=n.getOwner().getParent()}return null},s.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=r.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},s.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=o.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=o.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=s},function(t,e,n){t.exports=function(t){this.vGraphObject=t}},function(t,e,n){var i=n(2),r=n(10),o=n(13),s=n(0),a=n(16),h=n(4);function l(t,e,n,s){null==n&&null==s&&(s=e),i.call(this,s),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=r.MIN_VALUE,this.inclusionTreeDepth=r.MAX_VALUE,this.vGraphObject=s,this.edges=[],this.graphManager=t,this.rect=null!=n&&null!=e?new o(e.x,e.y,n.width,n.height):new o}for(var c in l.prototype=Object.create(i.prototype),i)l[c]=i[c];l.prototype.getEdges=function(){return this.edges},l.prototype.getChild=function(){return this.child},l.prototype.getOwner=function(){return this.owner},l.prototype.getWidth=function(){return this.rect.width},l.prototype.setWidth=function(t){this.rect.width=t},l.prototype.getHeight=function(){return this.rect.height},l.prototype.setHeight=function(t){this.rect.height=t},l.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},l.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},l.prototype.getCenter=function(){return new h(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},l.prototype.getLocation=function(){return new h(this.rect.x,this.rect.y)},l.prototype.getRect=function(){return this.rect},l.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},l.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},l.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},l.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},l.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},l.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},l.prototype.getEdgeListToNode=function(t){var e=[],n=this;return n.edges.forEach((function(i){if(i.target==t){if(i.source!=n)throw"Incorrect edge source!";e.push(i)}})),e},l.prototype.getEdgesBetween=function(t){var e=[],n=this;return n.edges.forEach((function(i){if(i.source!=n&&i.target!=n)throw"Incorrect edge source and/or target";i.target!=t&&i.source!=t||e.push(i)})),e},l.prototype.getNeighborsList=function(){var t=new Set,e=this;return e.edges.forEach((function(n){if(n.source==e)t.add(n.target);else{if(n.target!=e)throw"Incorrect incidency!";t.add(n.source)}})),t},l.prototype.withChildren=function(){var t=new Set;if(t.add(this),null!=this.child)for(var e=this.child.getNodes(),n=0;n<e.length;n++)e[n].withChildren().forEach((function(e){t.add(e)}));return t},l.prototype.getNoOfChildren=function(){var t=0;if(null==this.child)t=1;else for(var e=this.child.getNodes(),n=0;n<e.length;n++)t+=e[n].getNoOfChildren();return 0==t&&(t=1),t},l.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},l.prototype.calcEstimatedSize=function(){return null==this.child?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)},l.prototype.scatter=function(){var t,e,n=-s.INITIAL_WORLD_BOUNDARY,i=s.INITIAL_WORLD_BOUNDARY;t=s.WORLD_CENTER_X+a.nextDouble()*(i-n)+n;var r=-s.INITIAL_WORLD_BOUNDARY,o=s.INITIAL_WORLD_BOUNDARY;e=s.WORLD_CENTER_Y+a.nextDouble()*(o-r)+r,this.rect.x=t,this.rect.y=e},l.prototype.updateBounds=function(){if(null==this.getChild())throw"assert failed";if(0!=this.getChild().getNodes().length){var t=this.getChild();if(t.updateBounds(!0),this.rect.x=t.getLeft(),this.rect.y=t.getTop(),this.setWidth(t.getRight()-t.getLeft()),this.setHeight(t.getBottom()-t.getTop()),s.NODE_DIMENSIONS_INCLUDE_LABELS){var e=t.getRight()-t.getLeft(),n=t.getBottom()-t.getTop();this.labelWidth>e&&(this.rect.x-=(this.labelWidth-e)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-n)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},l.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==r.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},l.prototype.transform=function(t){var e=this.rect.x;e>s.WORLD_BOUNDARY?e=s.WORLD_BOUNDARY:e<-s.WORLD_BOUNDARY&&(e=-s.WORLD_BOUNDARY);var n=this.rect.y;n>s.WORLD_BOUNDARY?n=s.WORLD_BOUNDARY:n<-s.WORLD_BOUNDARY&&(n=-s.WORLD_BOUNDARY);var i=new h(e,n),r=t.inverseTransformPoint(i);this.setLocation(r.x,r.y)},l.prototype.getLeft=function(){return this.rect.x},l.prototype.getRight=function(){return this.rect.x+this.rect.width},l.prototype.getTop=function(){return this.rect.y},l.prototype.getBottom=function(){return this.rect.y+this.rect.height},l.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=l},function(t,e,n){function i(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.setX=function(t){this.x=t},i.prototype.setY=function(t){this.y=t},i.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},i.prototype.getCopy=function(){return new i(this.x,this.y)},i.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=i},function(t,e,n){var i=n(2),r=n(10),o=n(0),s=n(6),a=n(3),h=n(1),l=n(13),c=n(12),g=n(11);function u(t,e,n){i.call(this,n),this.estimatedSize=r.MIN_VALUE,this.margin=o.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(var d in u.prototype=Object.create(i.prototype),i)u[d]=i[d];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(t,e,n){if(null==e&&null==n){var i=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(i)>-1)throw"Node already in graph!";return i.owner=this,this.getNodes().push(i),i}var r=t;if(!(this.getNodes().indexOf(e)>-1&&this.getNodes().indexOf(n)>-1))throw"Source or target not in graph!";if(e.owner!=n.owner||e.owner!=this)throw"Both owners must be this graph!";return e.owner!=n.owner?null:(r.source=e,r.target=n,r.isInterGraph=!1,this.getEdges().push(r),e.edges.push(r),n!=e&&n.edges.push(r),r)},u.prototype.remove=function(t){var e=t;if(t instanceof a){if(null==e)throw"Node is null!";if(null==e.owner||e.owner!=this)throw"Owner graph is invalid!";if(null==this.graphManager)throw"Owner graph manager is invalid!";for(var n=e.edges.slice(),i=n.length,r=0;r<i;r++)(o=n[r]).isInterGraph?this.graphManager.remove(o):o.source.owner.remove(o);if(-1==(s=this.nodes.indexOf(e)))throw"Node not in owner node list!";this.nodes.splice(s,1)}else if(t instanceof h){var o;if(null==(o=t))throw"Edge is null!";if(null==o.source||null==o.target)throw"Source and/or target is null!";if(null==o.source.owner||null==o.target.owner||o.source.owner!=this||o.target.owner!=this)throw"Source and/or target owner is invalid!";var s,l=o.source.edges.indexOf(o),c=o.target.edges.indexOf(o);if(!(l>-1&&c>-1))throw"Source and/or target doesn't know this edge!";if(o.source.edges.splice(l,1),o.target!=o.source&&o.target.edges.splice(c,1),-1==(s=o.source.owner.getEdges().indexOf(o)))throw"Not in owner's edge list!";o.source.owner.getEdges().splice(s,1)}},u.prototype.updateLeftTop=function(){for(var t,e,n,i=r.MAX_VALUE,o=r.MAX_VALUE,s=this.getNodes(),a=s.length,h=0;h<a;h++){var l=s[h];i>(t=l.getTop())&&(i=t),o>(e=l.getLeft())&&(o=e)}return i==r.MAX_VALUE?null:(n=null!=s[0].getParent().paddingLeft?s[0].getParent().paddingLeft:this.margin,this.left=o-n,this.top=i-n,new c(this.left,this.top))},u.prototype.updateBounds=function(t){for(var e,n,i,o,s,a=r.MAX_VALUE,h=-r.MAX_VALUE,c=r.MAX_VALUE,g=-r.MAX_VALUE,u=this.nodes,d=u.length,p=0;p<d;p++){var f=u[p];t&&null!=f.child&&f.updateBounds(),a>(e=f.getLeft())&&(a=e),h<(n=f.getRight())&&(h=n),c>(i=f.getTop())&&(c=i),g<(o=f.getBottom())&&(g=o)}var y=new l(a,c,h-a,g-c);a==r.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),s=null!=u[0].getParent().paddingLeft?u[0].getParent().paddingLeft:this.margin,this.left=y.x-s,this.right=y.x+y.width+s,this.top=y.y-s,this.bottom=y.y+y.height+s},u.calculateBounds=function(t){for(var e,n,i,o,s=r.MAX_VALUE,a=-r.MAX_VALUE,h=r.MAX_VALUE,c=-r.MAX_VALUE,g=t.length,u=0;u<g;u++){var d=t[u];s>(e=d.getLeft())&&(s=e),a<(n=d.getRight())&&(a=n),h>(i=d.getTop())&&(h=i),c<(o=d.getBottom())&&(c=o)}return new l(s,h,a-s,c-h)},u.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==r.MIN_VALUE)throw"assert failed";return this.estimatedSize},u.prototype.calcEstimatedSize=function(){for(var t=0,e=this.nodes,n=e.length,i=0;i<n;i++)t+=e[i].calcEstimatedSize();return this.estimatedSize=0==t?o.EMPTY_COMPOUND_NODE_SIZE:t/Math.sqrt(this.nodes.length),this.estimatedSize},u.prototype.updateConnected=function(){var t=this;if(0!=this.nodes.length){var e,n,i=new g,r=new Set,o=this.nodes[0];for(o.withChildren().forEach((function(t){i.push(t),r.add(t)}));0!==i.length;)for(var s=(e=(o=i.shift()).getEdges()).length,a=0;a<s;a++)null==(n=e[a].getOtherEndInGraph(o,this))||r.has(n)||n.withChildren().forEach((function(t){i.push(t),r.add(t)}));if(this.isConnected=!1,r.size>=this.nodes.length){var h=0;r.forEach((function(e){e.owner==t&&h++})),h==this.nodes.length&&(this.isConnected=!0)}}else this.isConnected=!0},t.exports=u},function(t,e,n){var i,r=n(1);function o(t){i=n(5),this.layout=t,this.graphs=[],this.edges=[]}o.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),n=this.add(t,e);return this.setRootGraph(n),this.rootGraph},o.prototype.add=function(t,e,n,i,r){if(null==n&&null==i&&null==r){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(this.graphs.indexOf(t)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(t),null!=t.parent)throw"Already has a parent!";if(null!=e.child)throw"Already has a child!";return t.parent=e,e.child=t,t}r=n,n=t;var o=(i=e).getOwner(),s=r.getOwner();if(null==o||o.getGraphManager()!=this)throw"Source not in this graph mgr!";if(null==s||s.getGraphManager()!=this)throw"Target not in this graph mgr!";if(o==s)return n.isInterGraph=!1,o.add(n,i,r);if(n.isInterGraph=!0,n.source=i,n.target=r,this.edges.indexOf(n)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(n),null==n.source||null==n.target)throw"Edge source and/or target is null!";if(-1!=n.source.edges.indexOf(n)||-1!=n.target.edges.indexOf(n))throw"Edge already in source and/or target incidency list!";return n.source.edges.push(n),n.target.edges.push(n),n},o.prototype.remove=function(t){if(t instanceof i){var e=t;if(e.getGraphManager()!=this)throw"Graph not in this graph mgr";if(e!=this.rootGraph&&(null==e.parent||e.parent.graphManager!=this))throw"Invalid parent node!";for(var n,o=[],s=(o=o.concat(e.getEdges())).length,a=0;a<s;a++)n=o[a],e.remove(n);var h,l=[];for(s=(l=l.concat(e.getNodes())).length,a=0;a<s;a++)h=l[a],e.remove(h);e==this.rootGraph&&this.setRootGraph(null);var c=this.graphs.indexOf(e);this.graphs.splice(c,1),e.parent=null}else if(t instanceof r){if(null==(n=t))throw"Edge is null!";if(!n.isInterGraph)throw"Not an inter-graph edge!";if(null==n.source||null==n.target)throw"Source and/or target is null!";if(-1==n.source.edges.indexOf(n)||-1==n.target.edges.indexOf(n))throw"Source and/or target doesn't know this edge!";if(c=n.source.edges.indexOf(n),n.source.edges.splice(c,1),c=n.target.edges.indexOf(n),n.target.edges.splice(c,1),null==n.source.owner||null==n.source.owner.getGraphManager())throw"Edge owner graph or owner graph manager is null!";if(-1==n.source.owner.getGraphManager().edges.indexOf(n))throw"Not in owner graph manager's edge list!";c=n.source.owner.getGraphManager().edges.indexOf(n),n.source.owner.getGraphManager().edges.splice(c,1)}},o.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},o.prototype.getGraphs=function(){return this.graphs},o.prototype.getAllNodes=function(){if(null==this.allNodes){for(var t=[],e=this.getGraphs(),n=e.length,i=0;i<n;i++)t=t.concat(e[i].getNodes());this.allNodes=t}return this.allNodes},o.prototype.resetAllNodes=function(){this.allNodes=null},o.prototype.resetAllEdges=function(){this.allEdges=null},o.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},o.prototype.getAllEdges=function(){if(null==this.allEdges){var t=[],e=this.getGraphs();e.length;for(var n=0;n<e.length;n++)t=t.concat(e[n].getEdges());t=t.concat(this.edges),this.allEdges=t}return this.allEdges},o.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},o.prototype.setAllNodesToApplyGravitation=function(t){if(null!=this.allNodesToApplyGravitation)throw"assert failed";this.allNodesToApplyGravitation=t},o.prototype.getRoot=function(){return this.rootGraph},o.prototype.setRootGraph=function(t){if(t.getGraphManager()!=this)throw"Root not in this graph mgr!";this.rootGraph=t,null==t.parent&&(t.parent=this.layout.newNode("Root node"))},o.prototype.getLayout=function(){return this.layout},o.prototype.isOneAncestorOfOther=function(t,e){if(null==t||null==e)throw"assert failed";if(t==e)return!0;for(var n,i=t.getOwner();null!=(n=i.getParent());){if(n==e)return!0;if(null==(i=n.getOwner()))break}for(i=e.getOwner();null!=(n=i.getParent());){if(n==t)return!0;if(null==(i=n.getOwner()))break}return!1},o.prototype.calcLowestCommonAncestors=function(){for(var t,e,n,i,r,o=this.getAllEdges(),s=o.length,a=0;a<s;a++)if(e=(t=o[a]).source,n=t.target,t.lca=null,t.sourceInLca=e,t.targetInLca=n,e!=n){for(i=e.getOwner();null==t.lca;){for(t.targetInLca=n,r=n.getOwner();null==t.lca;){if(r==i){t.lca=r;break}if(r==this.rootGraph)break;if(null!=t.lca)throw"assert failed";t.targetInLca=r.getParent(),r=t.targetInLca.getOwner()}if(i==this.rootGraph)break;null==t.lca&&(t.sourceInLca=i.getParent(),i=t.sourceInLca.getOwner())}if(null==t.lca)throw"assert failed"}else t.lca=e.getOwner()},o.prototype.calcLowestCommonAncestor=function(t,e){if(t==e)return t.getOwner();for(var n=t.getOwner();null!=n;){for(var i=e.getOwner();null!=i;){if(i==n)return i;i=i.getParent().getOwner()}n=n.getParent().getOwner()}return n},o.prototype.calcInclusionTreeDepths=function(t,e){var n;null==t&&null==e&&(t=this.rootGraph,e=1);for(var i=t.getNodes(),r=i.length,o=0;o<r;o++)(n=i[o]).inclusionTreeDepth=e,null!=n.child&&this.calcInclusionTreeDepths(n.child,e+1)},o.prototype.includesInvalidEdge=function(){for(var t,e=this.edges.length,n=0;n<e;n++)if(t=this.edges[n],this.isOneAncestorOfOther(t.source,t.target))return!0;return!1},t.exports=o},function(t,e,n){var i=n(0);function r(){}for(var o in i)r[o]=i[o];r.MAX_ITERATIONS=2500,r.DEFAULT_EDGE_LENGTH=50,r.DEFAULT_SPRING_STRENGTH=.45,r.DEFAULT_REPULSION_STRENGTH=4500,r.DEFAULT_GRAVITY_STRENGTH=.4,r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,r.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,r.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,r.COOLING_ADAPTATION_FACTOR=.33,r.ADAPTATION_LOWER_NODE_LIMIT=1e3,r.ADAPTATION_UPPER_NODE_LIMIT=5e3,r.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,r.MAX_NODE_DISPLACEMENT=3*r.MAX_NODE_DISPLACEMENT_INCREMENTAL,r.MIN_REPULSION_DIST=r.DEFAULT_EDGE_LENGTH/10,r.CONVERGENCE_CHECK_PERIOD=100,r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,r.MIN_EDGE_LENGTH=1,r.GRID_CALCULATION_CHECK_PERIOD=10,t.exports=r},function(t,e,n){var i=n(12);function r(){}r.calcSeparationAmount=function(t,e,n,i){if(!t.intersects(e))throw"assert failed";var r=new Array(2);this.decideDirectionsForOverlappingNodes(t,e,r),n[0]=Math.min(t.getRight(),e.getRight())-Math.max(t.x,e.x),n[1]=Math.min(t.getBottom(),e.getBottom())-Math.max(t.y,e.y),t.getX()<=e.getX()&&t.getRight()>=e.getRight()?n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()));var o=Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()));e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()&&(o=1);var s=o*n[0],a=n[1]/o;n[0]<a?a=n[0]:s=n[1],n[0]=-1*r[0]*(a/2+i),n[1]=-1*r[1]*(s/2+i)},r.decideDirectionsForOverlappingNodes=function(t,e,n){t.getCenterX()<e.getCenterX()?n[0]=-1:n[0]=1,t.getCenterY()<e.getCenterY()?n[1]=-1:n[1]=1},r.getIntersection2=function(t,e,n){var i=t.getCenterX(),r=t.getCenterY(),o=e.getCenterX(),s=e.getCenterY();if(t.intersects(e))return n[0]=i,n[1]=r,n[2]=o,n[3]=s,!0;var a=t.getX(),h=t.getY(),l=t.getRight(),c=t.getX(),g=t.getBottom(),u=t.getRight(),d=t.getWidthHalf(),p=t.getHeightHalf(),f=e.getX(),y=e.getY(),E=e.getRight(),m=e.getX(),_=e.getBottom(),v=e.getRight(),N=e.getWidthHalf(),A=e.getHeightHalf(),L=!1,T=!1;if(i===o){if(r>s)return n[0]=i,n[1]=h,n[2]=o,n[3]=_,!1;if(r<s)return n[0]=i,n[1]=g,n[2]=o,n[3]=y,!1}else if(r===s){if(i>o)return n[0]=a,n[1]=r,n[2]=E,n[3]=s,!1;if(i<o)return n[0]=l,n[1]=r,n[2]=f,n[3]=s,!1}else{var O=t.height/t.width,D=e.height/e.width,I=(s-r)/(o-i),w=void 0,R=void 0,C=void 0,M=void 0,x=void 0,G=void 0;if(-O===I?i>o?(n[0]=c,n[1]=g,L=!0):(n[0]=l,n[1]=h,L=!0):O===I&&(i>o?(n[0]=a,n[1]=h,L=!0):(n[0]=u,n[1]=g,L=!0)),-D===I?o>i?(n[2]=m,n[3]=_,T=!0):(n[2]=E,n[3]=y,T=!0):D===I&&(o>i?(n[2]=f,n[3]=y,T=!0):(n[2]=v,n[3]=_,T=!0)),L&&T)return!1;if(i>o?r>s?(w=this.getCardinalDirection(O,I,4),R=this.getCardinalDirection(D,I,2)):(w=this.getCardinalDirection(-O,I,3),R=this.getCardinalDirection(-D,I,1)):r>s?(w=this.getCardinalDirection(-O,I,1),R=this.getCardinalDirection(-D,I,3)):(w=this.getCardinalDirection(O,I,2),R=this.getCardinalDirection(D,I,4)),!L)switch(w){case 1:M=h,C=i+-p/I,n[0]=C,n[1]=M;break;case 2:C=u,M=r+d*I,n[0]=C,n[1]=M;break;case 3:M=g,C=i+p/I,n[0]=C,n[1]=M;break;case 4:C=c,M=r+-d*I,n[0]=C,n[1]=M}if(!T)switch(R){case 1:G=y,x=o+-A/I,n[2]=x,n[3]=G;break;case 2:x=v,G=s+N*I,n[2]=x,n[3]=G;break;case 3:G=_,x=o+A/I,n[2]=x,n[3]=G;break;case 4:x=m,G=s+-N*I,n[2]=x,n[3]=G}}return!1},r.getCardinalDirection=function(t,e,n){return t>e?n:1+n%4},r.getIntersection=function(t,e,n,r){if(null==r)return this.getIntersection2(t,e,n);var o,s,a,h,l,c,g,u=t.x,d=t.y,p=e.x,f=e.y,y=n.x,E=n.y,m=r.x,_=r.y;return 0==(g=(o=f-d)*(h=y-m)-(s=_-E)*(a=u-p))?null:new i((a*(c=m*E-y*_)-h*(l=p*d-u*f))/g,(s*l-o*c)/g)},r.angleOfVector=function(t,e,n,i){var r=void 0;return t!==n?(r=Math.atan((i-e)/(n-t)),n<t?r+=Math.PI:i<e&&(r+=this.TWO_PI)):r=i<e?this.ONE_AND_HALF_PI:this.HALF_PI,r},r.doIntersect=function(t,e,n,i){var r=t.x,o=t.y,s=e.x,a=e.y,h=n.x,l=n.y,c=i.x,g=i.y,u=(s-r)*(g-l)-(c-h)*(a-o);if(0===u)return!1;var d=((g-l)*(c-r)+(h-c)*(g-o))/u,p=((o-a)*(c-r)+(s-r)*(g-o))/u;return 0<d&&d<1&&0<p&&p<1},r.HALF_PI=.5*Math.PI,r.ONE_AND_HALF_PI=1.5*Math.PI,r.TWO_PI=2*Math.PI,r.THREE_PI=3*Math.PI,t.exports=r},function(t,e,n){function i(){}i.sign=function(t){return t>0?1:t<0?-1:0},i.floor=function(t){return t<0?Math.ceil(t):Math.floor(t)},i.ceil=function(t){return t<0?Math.floor(t):Math.ceil(t)},t.exports=i},function(t,e,n){function i(){}i.MAX_VALUE=2147483647,i.MIN_VALUE=-2147483648,t.exports=i},function(t,e,n){var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function(t){return{value:t,next:null,prev:null}},o=function(t,e,n,i){return null!==t?t.next=e:i.head=e,null!==n?n.prev=e:i.tail=e,e.prev=t,e.next=n,i.length++,e},s=function(t,e){var n=t.prev,i=t.next;return null!==n?n.next=i:e.head=i,null!==i?i.prev=n:e.tail=n,t.prev=t.next=null,e.length--,t},a=function(){function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.length=0,this.head=null,this.tail=null,null!=e&&e.forEach((function(t){return n.push(t)}))}return i(t,[{key:"size",value:function(){return this.length}},{key:"insertBefore",value:function(t,e){return o(e.prev,r(t),e,this)}},{key:"insertAfter",value:function(t,e){return o(e,r(t),e.next,this)}},{key:"insertNodeBefore",value:function(t,e){return o(e.prev,t,e,this)}},{key:"insertNodeAfter",value:function(t,e){return o(e,t,e.next,this)}},{key:"push",value:function(t){return o(this.tail,r(t),null,this)}},{key:"unshift",value:function(t){return o(null,r(t),this.head,this)}},{key:"remove",value:function(t){return s(t,this)}},{key:"pop",value:function(){return s(this.tail,this).value}},{key:"popNode",value:function(){return s(this.tail,this)}},{key:"shift",value:function(){return s(this.head,this).value}},{key:"shiftNode",value:function(){return s(this.head,this)}},{key:"get_object_at",value:function(t){if(t<=this.length()){for(var e=1,n=this.head;e<t;)n=n.next,e++;return n.value}}},{key:"set_object_at",value:function(t,e){if(t<=this.length()){for(var n=1,i=this.head;n<t;)i=i.next,n++;i.value=e}}}]),t}();t.exports=a},function(t,e,n){function i(t,e,n){this.x=null,this.y=null,null==t&&null==e&&null==n?(this.x=0,this.y=0):"number"==typeof t&&"number"==typeof e&&null==n?(this.x=t,this.y=e):"Point"==t.constructor.name&&null==e&&null==n&&(n=t,this.x=n.x,this.y=n.y)}i.prototype.getX=function(){return this.x},i.prototype.getY=function(){return this.y},i.prototype.getLocation=function(){return new i(this.x,this.y)},i.prototype.setLocation=function(t,e,n){"Point"==t.constructor.name&&null==e&&null==n?(n=t,this.setLocation(n.x,n.y)):"number"==typeof t&&"number"==typeof e&&null==n&&(parseInt(t)==t&&parseInt(e)==e?this.move(t,e):(this.x=Math.floor(t+.5),this.y=Math.floor(e+.5)))},i.prototype.move=function(t,e){this.x=t,this.y=e},i.prototype.translate=function(t,e){this.x+=t,this.y+=e},i.prototype.equals=function(t){if("Point"==t.constructor.name){var e=t;return this.x==e.x&&this.y==e.y}return this==t},i.prototype.toString=function(){return(new i).constructor.name+"[x="+this.x+",y="+this.y+"]"},t.exports=i},function(t,e,n){function i(t,e,n,i){this.x=0,this.y=0,this.width=0,this.height=0,null!=t&&null!=e&&null!=n&&null!=i&&(this.x=t,this.y=e,this.width=n,this.height=i)}i.prototype.getX=function(){return this.x},i.prototype.setX=function(t){this.x=t},i.prototype.getY=function(){return this.y},i.prototype.setY=function(t){this.y=t},i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(t){this.width=t},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(t){this.height=t},i.prototype.getRight=function(){return this.x+this.width},i.prototype.getBottom=function(){return this.y+this.height},i.prototype.intersects=function(t){return!(this.getRight()<t.x||this.getBottom()<t.y||t.getRight()<this.x||t.getBottom()<this.y)},i.prototype.getCenterX=function(){return this.x+this.width/2},i.prototype.getMinX=function(){return this.getX()},i.prototype.getMaxX=function(){return this.getX()+this.width},i.prototype.getCenterY=function(){return this.y+this.height/2},i.prototype.getMinY=function(){return this.getY()},i.prototype.getMaxY=function(){return this.getY()+this.height},i.prototype.getWidthHalf=function(){return this.width/2},i.prototype.getHeightHalf=function(){return this.height/2},t.exports=i},function(t,e,n){var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function r(){}r.lastID=0,r.createID=function(t){return r.isPrimitive(t)?t:(null!=t.uniqueID||(t.uniqueID=r.getString(),r.lastID++),t.uniqueID)},r.getString=function(t){return null==t&&(t=r.lastID),"Object#"+t},r.isPrimitive=function(t){var e=void 0===t?"undefined":i(t);return null==t||"object"!=e&&"function"!=e},t.exports=r},function(t,e,n){function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var r=n(0),o=n(6),s=n(3),a=n(1),h=n(5),l=n(4),c=n(17),g=n(27);function u(t){g.call(this),this.layoutQuality=r.QUALITY,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=r.DEFAULT_INCREMENTAL,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new o(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,null!=t&&(this.isRemoteUse=t)}u.RANDOM_SEED=1,u.prototype=Object.create(g.prototype),u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},u.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},u.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},u.prototype.newGraphManager=function(){var t=new o(this);return this.graphManager=t,t},u.prototype.newGraph=function(t){return new h(null,this.graphManager,t)},u.prototype.newNode=function(t){return new s(this.graphManager,t)},u.prototype.newEdge=function(t){return new a(null,null,t)},u.prototype.checkLayoutSuccess=function(){return null==this.graphManager.getRoot()||0==this.graphManager.getRoot().getNodes().length||this.graphManager.includesInvalidEdge()},u.prototype.runLayout=function(){var t;return this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters(),t=!this.checkLayoutSuccess()&&this.layout(),"during"!==r.ANIMATE&&(t&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,t)},u.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},u.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var t=this.graphManager.getAllEdges(),e=0;e<t.length;e++)t[e];var n=this.graphManager.getRoot().getNodes();for(e=0;e<n.length;e++)n[e];this.update(this.graphManager.getRoot())}},u.prototype.update=function(t){if(null==t)this.update2();else if(t instanceof s){var e=t;if(null!=e.getChild())for(var n=e.getChild().getNodes(),i=0;i<n.length;i++)update(n[i]);null!=e.vGraphObject&&e.vGraphObject.update(e)}else if(t instanceof a){var r=t;null!=r.vGraphObject&&r.vGraphObject.update(r)}else if(t instanceof h){var o=t;null!=o.vGraphObject&&o.vGraphObject.update(o)}},u.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=r.QUALITY,this.animationDuringLayout=r.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=r.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=r.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=r.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=r.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=r.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},u.prototype.transform=function(t){if(null==t)this.transform(new l(0,0));else{var e=new c,n=this.graphManager.getRoot().updateLeftTop();if(null!=n){e.setWorldOrgX(t.x),e.setWorldOrgY(t.y),e.setDeviceOrgX(n.x),e.setDeviceOrgY(n.y);for(var i=this.getAllNodes(),r=0;r<i.length;r++)i[r].transform(e)}}},u.prototype.positionNodesRandomly=function(t){if(null==t)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var e,n,i=t.getNodes(),r=0;r<i.length;r++)null==(n=(e=i[r]).getChild())||0==n.getNodes().length?e.scatter():(this.positionNodesRandomly(n),e.updateBounds())},u.prototype.getFlatForest=function(){for(var t=[],e=!0,n=this.graphManager.getRoot().getNodes(),r=!0,o=0;o<n.length;o++)null!=n[o].getChild()&&(r=!1);if(!r)return t;var s=new Set,a=[],h=new Map,l=[];for(l=l.concat(n);l.length>0&&e;){for(a.push(l[0]);a.length>0&&e;){var c=a[0];a.splice(0,1),s.add(c);var g=c.getEdges();for(o=0;o<g.length;o++){var u=g[o].getOtherEnd(c);if(h.get(c)!=u){if(s.has(u)){e=!1;break}a.push(u),h.set(u,c)}}}if(e){var d=[].concat(i(s));for(t.push(d),o=0;o<d.length;o++){var p=d[o],f=l.indexOf(p);f>-1&&l.splice(f,1)}s=new Set,h=new Map}else t=[]}return t},u.prototype.createDummyNodesForBendpoints=function(t){for(var e=[],n=t.source,i=this.graphManager.calcLowestCommonAncestor(t.source,t.target),r=0;r<t.bendpoints.length;r++){var o=this.newNode(null);o.setRect(new Point(0,0),new Dimension(1,1)),i.add(o);var s=this.newEdge(null);this.graphManager.add(s,n,o),e.add(o),n=o}return s=this.newEdge(null),this.graphManager.add(s,n,t.target),this.edgeToDummyNodes.set(t,e),t.isInterGraph()?this.graphManager.remove(t):i.remove(t),e},u.prototype.createBendpointsFromDummyNodes=function(){var t=[];t=t.concat(this.graphManager.getAllEdges()),t=[].concat(i(this.edgeToDummyNodes.keys())).concat(t);for(var e=0;e<t.length;e++){var n=t[e];if(n.bendpoints.length>0){for(var r=this.edgeToDummyNodes.get(n),o=0;o<r.length;o++){var s=r[o],a=new l(s.getCenterX(),s.getCenterY()),h=n.bendpoints.get(o);h.x=a.x,h.y=a.y,s.getOwner().remove(s)}this.graphManager.add(n,n.source,n.target)}}},u.transform=function(t,e,n,i){if(null!=n&&null!=i){var r=e;return t<=50?r-=(e-e/n)/50*(50-t):r+=(e*i-e)/50*(t-50),r}var o,s;return t<=50?(o=9*e/500,s=e/10):(o=9*e/50,s=-8*e),o*t+s},u.findCenterOfTree=function(t){var e=[];e=e.concat(t);var n=[],i=new Map,r=!1,o=null;1!=e.length&&2!=e.length||(r=!0,o=e[0]);for(var s=0;s<e.length;s++){var a=(c=e[s]).getNeighborsList().size;i.set(c,c.getNeighborsList().size),1==a&&n.push(c)}var h=[];for(h=h.concat(n);!r;){var l=[];for(l=l.concat(h),h=[],s=0;s<e.length;s++){var c=e[s],g=e.indexOf(c);g>=0&&e.splice(g,1),c.getNeighborsList().forEach((function(t){if(n.indexOf(t)<0){var e=i.get(t)-1;1==e&&h.push(t),i.set(t,e)}}))}n=n.concat(h),1!=e.length&&2!=e.length||(r=!0,o=e[0])}return o},u.prototype.setGraphManager=function(t){this.graphManager=t},t.exports=u},function(t,e,n){function i(){}i.seed=1,i.x=0,i.nextDouble=function(){return i.x=1e4*Math.sin(i.seed++),i.x-Math.floor(i.x)},t.exports=i},function(t,e,n){var i=n(4);function r(t,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}r.prototype.getWorldOrgX=function(){return this.lworldOrgX},r.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},r.prototype.getWorldOrgY=function(){return this.lworldOrgY},r.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},r.prototype.getWorldExtX=function(){return this.lworldExtX},r.prototype.setWorldExtX=function(t){this.lworldExtX=t},r.prototype.getWorldExtY=function(){return this.lworldExtY},r.prototype.setWorldExtY=function(t){this.lworldExtY=t},r.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},r.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},r.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},r.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},r.prototype.getDeviceExtX=function(){return this.ldeviceExtX},r.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},r.prototype.getDeviceExtY=function(){return this.ldeviceExtY},r.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},r.prototype.transformX=function(t){var e=0,n=this.lworldExtX;return 0!=n&&(e=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/n),e},r.prototype.transformY=function(t){var e=0,n=this.lworldExtY;return 0!=n&&(e=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/n),e},r.prototype.inverseTransformX=function(t){var e=0,n=this.ldeviceExtX;return 0!=n&&(e=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/n),e},r.prototype.inverseTransformY=function(t){var e=0,n=this.ldeviceExtY;return 0!=n&&(e=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/n),e},r.prototype.inverseTransformPoint=function(t){return new i(this.inverseTransformX(t.x),this.inverseTransformY(t.y))},t.exports=r},function(t,e,n){var i=n(15),r=n(7),o=n(0),s=n(8),a=n(9);function h(){i.call(this),this.useSmartIdealEdgeLengthCalculation=r.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=r.DEFAULT_EDGE_LENGTH,this.springConstant=r.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=r.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=r.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=r.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=r.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*r.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=r.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=r.MAX_ITERATIONS}for(var l in h.prototype=Object.create(i.prototype),i)h[l]=i[l];h.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=r.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},h.prototype.calcIdealEdgeLengths=function(){for(var t,e,n,i,s,a,h=this.getGraphManager().getAllEdges(),l=0;l<h.length;l++)(t=h[l]).idealLength=this.idealEdgeLength,t.isInterGraph&&(n=t.getSource(),i=t.getTarget(),s=t.getSourceInLca().getEstimatedSize(),a=t.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(t.idealLength+=s+a-2*o.SIMPLE_NODE_SIZE),e=t.getLca().getInclusionTreeDepth(),t.idealLength+=r.DEFAULT_EDGE_LENGTH*r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(n.getInclusionTreeDepth()+i.getInclusionTreeDepth()-2*e))},h.prototype.initSpringEmbedder=function(){var t=this.getAllNodes().length;this.incremental?(t>r.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*r.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-r.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>r.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(r.COOLING_ADAPTATION_FACTOR,1-(t-r.ADAPTATION_LOWER_NODE_LIMIT)/(r.ADAPTATION_UPPER_NODE_LIMIT-r.ADAPTATION_LOWER_NODE_LIMIT)*(1-r.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=r.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},h.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),n=0;n<e.length;n++)t=e[n],this.calcSpringForce(t,t.idealLength)},h.prototype.calcRepulsionForces=function(){var t,e,n,i,o,s=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],h=this.getAllNodes();if(this.useFRGridVariant)for(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&s&&this.updateGrid(),o=new Set,t=0;t<h.length;t++)n=h[t],this.calculateRepulsionForceOfANode(n,o,s,a),o.add(n);else for(t=0;t<h.length;t++)for(n=h[t],e=t+1;e<h.length;e++)i=h[e],n.getOwner()==i.getOwner()&&this.calcRepulsionForce(n,i)},h.prototype.calcGravitationalForces=function(){for(var t,e=this.getAllNodesToApplyGravitation(),n=0;n<e.length;n++)t=e[n],this.calcGravitationalForce(t)},h.prototype.moveNodes=function(){for(var t=this.getAllNodes(),e=0;e<t.length;e++)t[e].move()},h.prototype.calcSpringForce=function(t,e){var n,i,r,o,s=t.getSource(),a=t.getTarget();if(this.uniformLeafNodeSizes&&null==s.getChild()&&null==a.getChild())t.updateLengthSimple();else if(t.updateLength(),t.isOverlapingSourceAndTarget)return;0!=(n=t.getLength())&&(r=(i=this.springConstant*(n-e))*(t.lengthX/n),o=i*(t.lengthY/n),s.springForceX+=r,s.springForceY+=o,a.springForceX-=r,a.springForceY-=o)},h.prototype.calcRepulsionForce=function(t,e){var n,i,o,h,l,c,g,u=t.getRect(),d=e.getRect(),p=new Array(2),f=new Array(4);if(u.intersects(d)){s.calcSeparationAmount(u,d,p,r.DEFAULT_EDGE_LENGTH/2),c=2*p[0],g=2*p[1];var y=t.noOfChildren*e.noOfChildren/(t.noOfChildren+e.noOfChildren);t.repulsionForceX-=y*c,t.repulsionForceY-=y*g,e.repulsionForceX+=y*c,e.repulsionForceY+=y*g}else this.uniformLeafNodeSizes&&null==t.getChild()&&null==e.getChild()?(n=d.getCenterX()-u.getCenterX(),i=d.getCenterY()-u.getCenterY()):(s.getIntersection(u,d,f),n=f[2]-f[0],i=f[3]-f[1]),Math.abs(n)<r.MIN_REPULSION_DIST&&(n=a.sign(n)*r.MIN_REPULSION_DIST),Math.abs(i)<r.MIN_REPULSION_DIST&&(i=a.sign(i)*r.MIN_REPULSION_DIST),o=n*n+i*i,h=Math.sqrt(o),c=(l=this.repulsionConstant*t.noOfChildren*e.noOfChildren/o)*n/h,g=l*i/h,t.repulsionForceX-=c,t.repulsionForceY-=g,e.repulsionForceX+=c,e.repulsionForceY+=g},h.prototype.calcGravitationalForce=function(t){var e,n,i,r,o,s,a,h;n=((e=t.getOwner()).getRight()+e.getLeft())/2,i=(e.getTop()+e.getBottom())/2,r=t.getCenterX()-n,o=t.getCenterY()-i,s=Math.abs(r)+t.getWidth()/2,a=Math.abs(o)+t.getHeight()/2,t.getOwner()==this.graphManager.getRoot()?(s>(h=e.getEstimatedSize()*this.gravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*r,t.gravitationForceY=-this.gravityConstant*o):(s>(h=e.getEstimatedSize()*this.compoundGravityRangeFactor)||a>h)&&(t.gravitationForceX=-this.gravityConstant*r*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*o*this.compoundGravityConstant)},h.prototype.isConverged=function(){var t,e=!1;return this.totalIterations>this.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,t||e},h.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},h.prototype.calcNoOfChildrenForAllNodes=function(){for(var t,e=this.graphManager.getAllNodes(),n=0;n<e.length;n++)(t=e[n]).noOfChildren=t.getNoOfChildren()},h.prototype.calcGrid=function(t){var e,n;e=parseInt(Math.ceil((t.getRight()-t.getLeft())/this.repulsionRange)),n=parseInt(Math.ceil((t.getBottom()-t.getTop())/this.repulsionRange));for(var i=new Array(e),r=0;r<e;r++)i[r]=new Array(n);for(r=0;r<e;r++)for(var o=0;o<n;o++)i[r][o]=new Array;return i},h.prototype.addNodeToGrid=function(t,e,n){var i,r,o,s;i=parseInt(Math.floor((t.getRect().x-e)/this.repulsionRange)),r=parseInt(Math.floor((t.getRect().width+t.getRect().x-e)/this.repulsionRange)),o=parseInt(Math.floor((t.getRect().y-n)/this.repulsionRange)),s=parseInt(Math.floor((t.getRect().height+t.getRect().y-n)/this.repulsionRange));for(var a=i;a<=r;a++)for(var h=o;h<=s;h++)this.grid[a][h].push(t),t.setGridCoordinates(i,r,o,s)},h.prototype.updateGrid=function(){var t,e,n=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),t=0;t<n.length;t++)e=n[t],this.addNodeToGrid(e,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},h.prototype.calculateRepulsionForceOfANode=function(t,e,n,i){if(this.totalIterations%r.GRID_CALCULATION_CHECK_PERIOD==1&&n||i){var o,s=new Set;t.surrounding=new Array;for(var a=this.grid,h=t.startX-1;h<t.finishX+2;h++)for(var l=t.startY-1;l<t.finishY+2;l++)if(!(h<0||l<0||h>=a.length||l>=a[0].length))for(var c=0;c<a[h][l].length;c++)if(o=a[h][l][c],t.getOwner()==o.getOwner()&&t!=o&&!e.has(o)&&!s.has(o)){var g=Math.abs(t.getCenterX()-o.getCenterX())-(t.getWidth()/2+o.getWidth()/2),u=Math.abs(t.getCenterY()-o.getCenterY())-(t.getHeight()/2+o.getHeight()/2);g<=this.repulsionRange&&u<=this.repulsionRange&&s.add(o)}t.surrounding=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(s))}for(h=0;h<t.surrounding.length;h++)this.calcRepulsionForce(t,t.surrounding[h])},h.prototype.calcRepulsionRange=function(){return 0},t.exports=h},function(t,e,n){var i=n(1),r=n(7);function o(t,e,n){i.call(this,t,e,n),this.idealLength=r.DEFAULT_EDGE_LENGTH}for(var s in o.prototype=Object.create(i.prototype),i)o[s]=i[s];t.exports=o},function(t,e,n){var i=n(3);function r(t,e,n,r){i.call(this,t,e,n,r),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 o in r.prototype=Object.create(i.prototype),i)r[o]=i[o];r.prototype.setGridCoordinates=function(t,e,n,i){this.startX=t,this.finishX=e,this.startY=n,this.finishY=i},t.exports=r},function(t,e,n){function i(t,e){this.width=0,this.height=0,null!==t&&null!==e&&(this.height=e,this.width=t)}i.prototype.getWidth=function(){return this.width},i.prototype.setWidth=function(t){this.width=t},i.prototype.getHeight=function(){return this.height},i.prototype.setHeight=function(t){this.height=t},t.exports=i},function(t,e,n){var i=n(14);function r(){this.map={},this.keys=[]}r.prototype.put=function(t,e){var n=i.createID(t);this.contains(n)||(this.map[n]=e,this.keys.push(t))},r.prototype.contains=function(t){return i.createID(t),null!=this.map[t]},r.prototype.get=function(t){var e=i.createID(t);return this.map[e]},r.prototype.keySet=function(){return this.keys},t.exports=r},function(t,e,n){var i=n(14);function r(){this.set={}}r.prototype.add=function(t){var e=i.createID(t);this.contains(e)||(this.set[e]=t)},r.prototype.remove=function(t){delete this.set[i.createID(t)]},r.prototype.clear=function(){this.set={}},r.prototype.contains=function(t){return this.set[i.createID(t)]==t},r.prototype.isEmpty=function(){return 0===this.size()},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAllTo=function(t){for(var e=Object.keys(this.set),n=e.length,i=0;i<n;i++)t.push(this.set[e[i]])},r.prototype.size=function(){return Object.keys(this.set).length},r.prototype.addAll=function(t){for(var e=t.length,n=0;n<e;n++){var i=t[n];this.add(i)}},t.exports=r},function(t,e,n){var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=n(11),o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null===n&&void 0===n||(this.compareFunction=this._defaultCompareFunction);var i=void 0;i=e instanceof r?e.size():e.length,this._quicksort(e,0,i-1)}return i(t,[{key:"_quicksort",value:function(t,e,n){if(e<n){var i=this._partition(t,e,n);this._quicksort(t,e,i),this._quicksort(t,i+1,n)}}},{key:"_partition",value:function(t,e,n){for(var i=this._get(t,e),r=e,o=n;;){for(;this.compareFunction(i,this._get(t,o));)o--;for(;this.compareFunction(this._get(t,r),i);)r++;if(!(r<o))return o;this._swap(t,r,o),r++,o--}}},{key:"_get",value:function(t,e){return t instanceof r?t.get_object_at(e):t[e]}},{key:"_set",value:function(t,e,n){t instanceof r?t.set_object_at(e,n):t[e]=n}},{key:"_swap",value:function(t,e,n){var i=this._get(t,e);this._set(t,e,this._get(t,n)),this._set(t,n,i)}},{key:"_defaultCompareFunction",value:function(t,e){return e>t}}]),t}();t.exports=o},function(t,e,n){var i=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}(),r=function(){function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.sequence1=e,this.sequence2=n,this.match_score=i,this.mismatch_penalty=r,this.gap_penalty=o,this.iMax=e.length+1,this.jMax=n.length+1,this.grid=new Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=new Array(this.jMax);for(var a=0;a<this.jMax;a++)this.grid[s][a]=0}this.tracebackGrid=new Array(this.iMax);for(var h=0;h<this.iMax;h++){this.tracebackGrid[h]=new Array(this.jMax);for(var l=0;l<this.jMax;l++)this.tracebackGrid[h][l]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return i(t,[{key:"getScore",value:function(){return this.score}},{key:"getAlignments",value:function(){return this.alignments}},{key:"computeGrids",value:function(){for(var t=1;t<this.jMax;t++)this.grid[0][t]=this.grid[0][t-1]+this.gap_penalty,this.tracebackGrid[0][t]=[!1,!1,!0];for(var e=1;e<this.iMax;e++)this.grid[e][0]=this.grid[e-1][0]+this.gap_penalty,this.tracebackGrid[e][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var i=1;i<this.jMax;i++){var r=[this.sequence1[n-1]===this.sequence2[i-1]?this.grid[n-1][i-1]+this.match_score:this.grid[n-1][i-1]+this.mismatch_penalty,this.grid[n-1][i]+this.gap_penalty,this.grid[n][i-1]+this.gap_penalty],o=this.arrayAllMaxIndexes(r);this.grid[n][i]=r[o[0]],this.tracebackGrid[n][i]=[o.includes(0),o.includes(1),o.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:"alignmentTraceback",value:function(){var t=[];for(t.push({pos:[this.sequence1.length,this.sequence2.length],seq1:"",seq2:""});t[0];){var e=t[0],n=this.tracebackGrid[e.pos[0]][e.pos[1]];n[0]&&t.push({pos:[e.pos[0]-1,e.pos[1]-1],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),n[1]&&t.push({pos:[e.pos[0]-1,e.pos[1]],seq1:this.sequence1[e.pos[0]-1]+e.seq1,seq2:"-"+e.seq2}),n[2]&&t.push({pos:[e.pos[0],e.pos[1]-1],seq1:"-"+e.seq1,seq2:this.sequence2[e.pos[1]-1]+e.seq2}),0===e.pos[0]&&0===e.pos[1]&&this.alignments.push({sequence1:e.seq1,sequence2:e.seq2}),t.shift()}return this.alignments}},{key:"getAllIndexes",value:function(t,e){for(var n=[],i=-1;-1!==(i=t.indexOf(e,i+1));)n.push(i);return n}},{key:"arrayAllMaxIndexes",value:function(t){return this.getAllIndexes(t,Math.max.apply(null,t))}}]),t}();t.exports=r},function(t,e,n){var i=function(){};i.FDLayout=n(18),i.FDLayoutConstants=n(7),i.FDLayoutEdge=n(19),i.FDLayoutNode=n(20),i.DimensionD=n(21),i.HashMap=n(22),i.HashSet=n(23),i.IGeometry=n(8),i.IMath=n(9),i.Integer=n(10),i.Point=n(12),i.PointD=n(4),i.RandomSeed=n(16),i.RectangleD=n(13),i.Transform=n(17),i.UniqueIDGeneretor=n(14),i.Quicksort=n(24),i.LinkedList=n(11),i.LGraphObject=n(2),i.LGraph=n(5),i.LEdge=n(1),i.LGraphManager=n(6),i.LNode=n(3),i.Layout=n(15),i.LayoutConstants=n(0),i.NeedlemanWunsch=n(25),t.exports=i},function(t,e,n){function i(){this.listeners=[]}var r=i.prototype;r.addListener=function(t,e){this.listeners.push({event:t,callback:e})},r.removeListener=function(t,e){for(var n=this.listeners.length;n>=0;n--){var i=this.listeners[n];i.event===t&&i.callback===e&&this.listeners.splice(n,1)}},r.emit=function(t,e){for(var n=0;n<this.listeners.length;n++){var i=this.listeners[n];t===i.event&&i.callback(e)}},t.exports=i}])},m.exports=t());var t}var v;var N,A;const L=d((N||(N=1,y.exports=(A=v?E.exports:(v=1,E.exports=function(t){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(e,n){e.exports=t},function(t,e,n){var i=n(0).FDLayoutConstants;function r(){}for(var o in i)r[o]=i[o];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=r},function(t,e,n){var i=n(0).FDLayoutEdge;function r(t,e,n){i.call(this,t,e,n)}for(var o in r.prototype=Object.create(i.prototype),i)r[o]=i[o];t.exports=r},function(t,e,n){var i=n(0).LGraph;function r(t,e,n){i.call(this,t,e,n)}for(var o in r.prototype=Object.create(i.prototype),i)r[o]=i[o];t.exports=r},function(t,e,n){var i=n(0).LGraphManager;function r(t){i.call(this,t)}for(var o in r.prototype=Object.create(i.prototype),i)r[o]=i[o];t.exports=r},function(t,e,n){var i=n(0).FDLayoutNode,r=n(0).IMath;function o(t,e,n,r){i.call(this,t,e,n,r)}for(var s in o.prototype=Object.create(i.prototype),i)o[s]=i[s];o.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*r.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.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},o.prototype.propogateDisplacementToChildren=function(t,e){for(var n,i=this.getChild().getNodes(),r=0;r<i.length;r++)null==(n=i[r]).getChild()?(n.moveBy(t,e),n.displacementX+=t,n.displacementY+=e):n.propogateDisplacementToChildren(t,e)},o.prototype.setPred1=function(t){this.pred1=t},o.prototype.getPred1=function(){return pred1},o.prototype.getPred2=function(){return pred2},o.prototype.setNext=function(t){this.next=t},o.prototype.getNext=function(){return next},o.prototype.setProcessed=function(t){this.processed=t},o.prototype.isProcessed=function(){return processed},t.exports=o},function(t,e,n){var i=n(0).FDLayout,r=n(4),o=n(3),s=n(5),a=n(2),h=n(1),l=n(0).FDLayoutConstants,c=n(0).LayoutConstants,g=n(0).Point,u=n(0).PointD,d=n(0).Layout,p=n(0).Integer,f=n(0).IGeometry,y=n(0).LGraph,E=n(0).Transform;function m(){i.call(this),this.toBeTiled={}}for(var _ in m.prototype=Object.create(i.prototype),i)m[_]=i[_];m.prototype.newGraphManager=function(){var t=new r(this);return this.graphManager=t,t},m.prototype.newGraph=function(t){return new o(null,this.graphManager,t)},m.prototype.newNode=function(t){return new s(this.graphManager,t)},m.prototype.newEdge=function(t){return new a(null,null,t)},m.prototype.initParameters=function(){i.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=l.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=l.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.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/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=l.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},m.prototype.layout=function(){return c.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},m.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(),e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(t){return e.has(t)})),this.graphManager.setAllNodesToApplyGravitation(n));else{var t=this.getFlatForest();if(t.length>0)this.positionNodesRadially(t);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var e=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter((function(t){return e.has(t)}));this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},m.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%l.CONVERGENCE_CHECK_PERIOD==0&&!this.isTreeGrowing&&!this.isGrowthFinished){if(this.isConverged()){if(!(this.prunedNodesAll.length>0))return!0;this.isTreeGrowing=!0}this.coolingCycle++,0==this.layoutQuality?this.coolingAdjuster=this.coolingCycle:1==this.layoutQuality&&(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 t=new Set(this.getAllNodes()),e=this.nodesWithGravity.filter((function(e){return t.has(e)}));this.graphManager.setAllNodesToApplyGravitation(e),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=l.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=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,i=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,i),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},m.prototype.getPositionsData=function(){for(var t=this.graphManager.getAllNodes(),e={},n=0;n<t.length;n++){var i=t[n].rect,r=t[n].id;e[r]={id:r,x:i.getCenterX(),y:i.getCenterY(),w:i.width,h:i.height}}return e},m.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var t=!1;if("during"===l.ANIMATE)this.emit("layoutstarted");else{for(;!t;)t=this.tick();this.graphManager.updateBounds()}},m.prototype.calculateNodesToApplyGravitationTo=function(){var t,e,n=[],i=this.graphManager.getGraphs(),r=i.length;for(e=0;e<r;e++)(t=i[e]).updateConnected(),t.isConnected||(n=n.concat(t.getNodes()));return n},m.prototype.createBendpoints=function(){var t=[];t=t.concat(this.graphManager.getAllEdges());var e,n=new Set;for(e=0;e<t.length;e++){var i=t[e];if(!n.has(i)){var r=i.getSource(),o=i.getTarget();if(r==o)i.getBendpoints().push(new u),i.getBendpoints().push(new u),this.createDummyNodesForBendpoints(i),n.add(i);else{var s=[];if(s=(s=s.concat(r.getEdgeListToNode(o))).concat(o.getEdgeListToNode(r)),!n.has(s[0])){var a;if(s.length>1)for(a=0;a<s.length;a++){var h=s[a];h.getBendpoints().push(new u),this.createDummyNodesForBendpoints(h)}s.forEach((function(t){n.add(t)}))}}}if(n.size==t.length)break}},m.prototype.positionNodesRadially=function(t){for(var e=new g(0,0),n=Math.ceil(Math.sqrt(t.length)),i=0,r=0,o=0,s=new u(0,0),a=0;a<t.length;a++){a%n==0&&(o=0,r=i,0!=a&&(r+=h.DEFAULT_COMPONENT_SEPERATION),i=0);var l=t[a],p=d.findCenterOfTree(l);e.x=o,e.y=r,(s=m.radialLayout(l,p,e)).y>i&&(i=Math.floor(s.y)),o=Math.floor(s.x+h.DEFAULT_COMPONENT_SEPERATION)}this.transform(new u(c.WORLD_CENTER_X-s.x/2,c.WORLD_CENTER_Y-s.y/2))},m.radialLayout=function(t,e,n){var i=Math.max(this.maxDiagonalInTree(t),h.DEFAULT_RADIAL_SEPARATION);m.branchRadialLayout(e,null,0,359,0,i);var r=y.calculateBounds(t),o=new E;o.setDeviceOrgX(r.getMinX()),o.setDeviceOrgY(r.getMinY()),o.setWorldOrgX(n.x),o.setWorldOrgY(n.y);for(var s=0;s<t.length;s++)t[s].transform(o);var a=new u(r.getMaxX(),r.getMaxY());return o.inverseTransformPoint(a)},m.branchRadialLayout=function(t,e,n,i,r,o){var s=(i-n+1)/2;s<0&&(s+=180);var a=(s+n)%360*f.TWO_PI/360,h=r*Math.cos(a),l=r*Math.sin(a);t.setCenter(h,l);var c=[],g=(c=c.concat(t.getEdges())).length;null!=e&&g--;for(var u,d=0,p=c.length,y=t.getEdgesBetween(e);y.length>1;){var E=y[0];y.splice(0,1);var _=c.indexOf(E);_>=0&&c.splice(_,1),p--,g--}u=null!=e?(c.indexOf(y[0])+1)%p:0;for(var v=Math.abs(i-n)/g,N=u;d!=g;N=++N%p){var A=c[N].getOtherEnd(t);if(A!=e){var L=(n+d*v)%360,T=(L+v)%360;m.branchRadialLayout(A,t,L,T,r+o,o),d++}}},m.maxDiagonalInTree=function(t){for(var e=p.MIN_VALUE,n=0;n<t.length;n++){var i=t[n].getDiagonal();i>e&&(e=i)}return e},m.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},m.prototype.groupZeroDegreeMembers=function(){var t=this,e={};this.memberGroups={},this.idToDummyNode={};for(var n=[],i=this.graphManager.getAllNodes(),r=0;r<i.length;r++){var o=(a=i[r]).getParent();0!==this.getNodeDegreeWithChildren(a)||null!=o.id&&this.getToBeTiled(o)||n.push(a)}for(r=0;r<n.length;r++){var a,h=(a=n[r]).getParent().id;void 0===e[h]&&(e[h]=[]),e[h]=e[h].concat(a)}Object.keys(e).forEach((function(n){if(e[n].length>1){var i="DummyCompound_"+n;t.memberGroups[i]=e[n];var r=e[n][0].getParent(),o=new s(t.graphManager);o.id=i,o.paddingLeft=r.paddingLeft||0,o.paddingRight=r.paddingRight||0,o.paddingBottom=r.paddingBottom||0,o.paddingTop=r.paddingTop||0,t.idToDummyNode[i]=o;var a=t.getGraphManager().add(t.newGraph(),o),h=r.getChild();h.add(o);for(var l=0;l<e[n].length;l++){var c=e[n][l];h.remove(c),a.add(c)}}}))},m.prototype.clearCompounds=function(){var t={},e={};this.performDFSOnCompounds();for(var n=0;n<this.compoundOrder.length;n++)e[this.compoundOrder[n].id]=this.compoundOrder[n],t[this.compoundOrder[n].id]=[].concat(this.compoundOrder[n].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[n].getChild()),this.compoundOrder[n].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(t,e)},m.prototype.clearZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach((function(n){var i=t.idToDummyNode[n];e[n]=t.tileNodes(t.memberGroups[n],i.paddingLeft+i.paddingRight),i.rect.width=e[n].width,i.rect.height=e[n].height}))},m.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;t>=0;t--){var e=this.compoundOrder[t],n=e.id,i=e.paddingLeft,r=e.paddingTop;this.adjustLocations(this.tiledMemberPack[n],e.rect.x,e.rect.y,i,r)}},m.prototype.repopulateZeroDegreeMembers=function(){var t=this,e=this.tiledZeroDegreePack;Object.keys(e).forEach((function(n){var i=t.idToDummyNode[n],r=i.paddingLeft,o=i.paddingTop;t.adjustLocations(e[n],i.rect.x,i.rect.y,r,o)}))},m.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];var n=t.getChild();if(null==n)return this.toBeTiled[e]=!1,!1;for(var i=n.getNodes(),r=0;r<i.length;r++){var o=i[r];if(this.getNodeDegree(o)>0)return this.toBeTiled[e]=!1,!1;if(null!=o.getChild()){if(!this.getToBeTiled(o))return this.toBeTiled[e]=!1,!1}else this.toBeTiled[o.id]=!1}return this.toBeTiled[e]=!0,!0},m.prototype.getNodeDegree=function(t){t.id;for(var e=t.getEdges(),n=0,i=0;i<e.length;i++){var r=e[i];r.getSource().id!==r.getTarget().id&&(n+=1)}return n},m.prototype.getNodeDegreeWithChildren=function(t){var e=this.getNodeDegree(t);if(null==t.getChild())return e;for(var n=t.getChild().getNodes(),i=0;i<n.length;i++){var r=n[i];e+=this.getNodeDegreeWithChildren(r)}return e},m.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},m.prototype.fillCompexOrderByDFS=function(t){for(var e=0;e<t.length;e++){var n=t[e];null!=n.getChild()&&this.fillCompexOrderByDFS(n.getChild().getNodes()),this.getToBeTiled(n)&&this.compoundOrder.push(n)}},m.prototype.adjustLocations=function(t,e,n,i,r){n+=r;for(var o=e+=i,s=0;s<t.rows.length;s++){var a=t.rows[s];e=o;for(var h=0,l=0;l<a.length;l++){var c=a[l];c.rect.x=e,c.rect.y=n,e+=c.rect.width+t.horizontalPadding,c.rect.height>h&&(h=c.rect.height)}n+=h+t.verticalPadding}},m.prototype.tileCompoundMembers=function(t,e){var n=this;this.tiledMemberPack=[],Object.keys(t).forEach((function(i){var r=e[i];n.tiledMemberPack[i]=n.tileNodes(t[i],r.paddingLeft+r.paddingRight),r.rect.width=n.tiledMemberPack[i].width,r.rect.height=n.tiledMemberPack[i].height}))},m.prototype.tileNodes=function(t,e){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:h.TILING_PADDING_VERTICAL,horizontalPadding:h.TILING_PADDING_HORIZONTAL};t.sort((function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.height<e.rect.width*e.rect.height?1:0}));for(var i=0;i<t.length;i++){var r=t[i];0==n.rows.length?this.insertNodeToRow(n,r,0,e):this.canAddHorizontal(n,r.rect.width,r.rect.height)?this.insertNodeToRow(n,r,this.getShortestRowIndex(n),e):this.insertNodeToRow(n,r,n.rows.length,e),this.shiftToLastRow(n)}return n},m.prototype.insertNodeToRow=function(t,e,n,i){var r=i;n==t.rows.length&&(t.rows.push([]),t.rowWidth.push(r),t.rowHeight.push(0));var o=t.rowWidth[n]+e.rect.width;t.rows[n].length>0&&(o+=t.horizontalPadding),t.rowWidth[n]=o,t.width<o&&(t.width=o);var s=e.rect.height;n>0&&(s+=t.verticalPadding);var a=0;s>t.rowHeight[n]&&(a=t.rowHeight[n],t.rowHeight[n]=s,a=t.rowHeight[n]-a),t.height+=a,t.rows[n].push(e)},m.prototype.getShortestRowIndex=function(t){for(var e=-1,n=Number.MAX_VALUE,i=0;i<t.rows.length;i++)t.rowWidth[i]<n&&(e=i,n=t.rowWidth[i]);return e},m.prototype.getLongestRowIndex=function(t){for(var e=-1,n=Number.MIN_VALUE,i=0;i<t.rows.length;i++)t.rowWidth[i]>n&&(e=i,n=t.rowWidth[i]);return e},m.prototype.canAddHorizontal=function(t,e,n){var i=this.getShortestRowIndex(t);if(i<0)return!0;var r=t.rowWidth[i];if(r+t.horizontalPadding+e<=t.width)return!0;var o,s,a=0;return t.rowHeight[i]<n&&i>0&&(a=n+t.verticalPadding-t.rowHeight[i]),o=t.width-r>=e+t.horizontalPadding?(t.height+a)/(r+e+t.horizontalPadding):(t.height+a)/t.width,a=n+t.verticalPadding,(s=t.width<e?(t.height+a)/e:(t.height+a)/t.width)<1&&(s=1/s),o<1&&(o=1/o),o<s},m.prototype.shiftToLastRow=function(t){var e=this.getLongestRowIndex(t),n=t.rowWidth.length-1,i=t.rows[e],r=i[i.length-1],o=r.width+t.horizontalPadding;if(t.width-t.rowWidth[n]>o&&e!=n){i.splice(-1,1),t.rows[n].push(r),t.rowWidth[e]=t.rowWidth[e]-o,t.rowWidth[n]=t.rowWidth[n]+o,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,a=0;a<i.length;a++)i[a].height>s&&(s=i[a].height);e>0&&(s+=t.verticalPadding);var h=t.rowHeight[e]+t.rowHeight[n];t.rowHeight[e]=s,t.rowHeight[n]<r.height+t.verticalPadding&&(t.rowHeight[n]=r.height+t.verticalPadding);var l=t.rowHeight[e]+t.rowHeight[n];t.height+=l-h,this.shiftToLastRow(t)}},m.prototype.tilingPreLayout=function(){h.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},m.prototype.tilingPostLayout=function(){h.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},m.prototype.reduceTrees=function(){for(var t,e=[],n=!0;n;){var i=this.graphManager.getAllNodes(),r=[];n=!1;for(var o=0;o<i.length;o++)1!=(t=i[o]).getEdges().length||t.getEdges()[0].isInterGraph||null!=t.getChild()||(r.push([t,t.getEdges()[0],t.getOwner()]),n=!0);if(1==n){for(var s=[],a=0;a<r.length;a++)1==r[a][0].getEdges().length&&(s.push(r[a]),r[a][0].getOwner().remove(r[a][0]));e.push(s),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},m.prototype.growTree=function(t){for(var e,n=t[t.length-1],i=0;i<n.length;i++)e=n[i],this.findPlaceforPrunedNode(e),e[2].add(e[0]),e[2].add(e[1],e[1].source,e[1].target);t.splice(t.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},m.prototype.findPlaceforPrunedNode=function(t){var e,n,i=t[0],r=(n=i==t[1].source?t[1].target:t[1].source).startX,o=n.finishX,s=n.startY,a=n.finishY,h=[0,0,0,0];if(s>0)for(var c=r;c<=o;c++)h[0]+=this.grid[c][s-1].length+this.grid[c][s].length-1;if(o<this.grid.length-1)for(c=s;c<=a;c++)h[1]+=this.grid[o+1][c].length+this.grid[o][c].length-1;if(a<this.grid[0].length-1)for(c=r;c<=o;c++)h[2]+=this.grid[c][a+1].length+this.grid[c][a].length-1;if(r>0)for(c=s;c<=a;c++)h[3]+=this.grid[r-1][c].length+this.grid[r][c].length-1;for(var g,u,d=p.MAX_VALUE,f=0;f<h.length;f++)h[f]<d?(d=h[f],g=1,u=f):h[f]==d&&g++;if(3==g&&0==d)0==h[0]&&0==h[1]&&0==h[2]?e=1:0==h[0]&&0==h[1]&&0==h[3]?e=0:0==h[0]&&0==h[2]&&0==h[3]?e=3:0==h[1]&&0==h[2]&&0==h[3]&&(e=2);else if(2==g&&0==d){var y=Math.floor(2*Math.random());e=0==h[0]&&0==h[1]?0==y?0:1:0==h[0]&&0==h[2]?0==y?0:2:0==h[0]&&0==h[3]?0==y?0:3:0==h[1]&&0==h[2]?0==y?1:2:0==h[1]&&0==h[3]?0==y?1:3:0==y?2:3}else e=4==g&&0==d?y=Math.floor(4*Math.random()):u;0==e?i.setCenter(n.getCenterX(),n.getCenterY()-n.getHeight()/2-l.DEFAULT_EDGE_LENGTH-i.getHeight()/2):1==e?i.setCenter(n.getCenterX()+n.getWidth()/2+l.DEFAULT_EDGE_LENGTH+i.getWidth()/2,n.getCenterY()):2==e?i.setCenter(n.getCenterX(),n.getCenterY()+n.getHeight()/2+l.DEFAULT_EDGE_LENGTH+i.getHeight()/2):i.setCenter(n.getCenterX()-n.getWidth()/2-l.DEFAULT_EDGE_LENGTH-i.getWidth()/2,n.getCenterY())},t.exports=m},function(t,e,n){var i={};i.layoutBase=n(0),i.CoSEConstants=n(1),i.CoSEEdge=n(2),i.CoSEGraph=n(3),i.CoSEGraphManager=n(4),i.CoSELayout=n(6),i.CoSENode=n(5),t.exports=i}])}(_())),function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.i=function(t){return t},n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e){t.exports=A},function(t,e,n){var i=n(0).layoutBase.LayoutConstants,r=n(0).layoutBase.FDLayoutConstants,o=n(0).CoSEConstants,s=n(0).CoSELayout,a=n(0).CoSENode,h=n(0).layoutBase.PointD,l=n(0).layoutBase.DimensionD,c={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 g(t){this.options=function(t,e){var n={};for(var i in t)n[i]=t[i];for(var i in e)n[i]=e[i];return n}(c,t),u(this.options)}var u=function(t){null!=t.nodeRepulsion&&(o.DEFAULT_REPULSION_STRENGTH=r.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(o.DEFAULT_EDGE_LENGTH=r.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(o.DEFAULT_SPRING_STRENGTH=r.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(o.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(o.DEFAULT_GRAVITY_STRENGTH=r.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(o.MAX_ITERATIONS=r.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(o.DEFAULT_GRAVITY_RANGE_FACTOR=r.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(o.DEFAULT_COMPOUND_GRAVITY_STRENGTH=r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(o.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(o.DEFAULT_COOLING_FACTOR_INCREMENTAL=r.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?i.QUALITY=0:"proof"==t.quality?i.QUALITY=2:i.QUALITY=1,o.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,o.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=!t.randomize,o.ANIMATE=r.ANIMATE=i.ANIMATE=t.animate,o.TILE=t.tile,o.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,o.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal};g.prototype.run=function(){var t,e,n=this.options;this.idToLNode={};var i=this.layout=new s,r=this;r.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var o=i.newGraphManager();this.gm=o;var a=this.options.eles.nodes(),h=this.options.eles.edges();this.root=o.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(a),i);for(var l=0;l<h.length;l++){var c=h[l],g=this.idToLNode[c.data("source")],u=this.idToLNode[c.data("target")];g!==u&&0==g.getEdgesBetween(u).length&&(o.add(i.newEdge(),g,u).id=c.id())}var d=function(t,e){"number"==typeof t&&(t=e);var n=t.data("id"),i=r.idToLNode[n];return{x:i.getRect().getCenterX(),y:i.getRect().getCenterY()}},p=function o(){for(var s,a=function(){n.fit&&n.cy.fit(n.eles,n.padding),t||(t=!0,r.cy.one("layoutready",n.ready),r.cy.trigger({type:"layoutready",layout:r}))},h=r.options.refresh,l=0;l<h&&!s;l++)s=r.stopped||r.layout.tick();if(s)return i.checkLayoutSuccess()&&!i.isSubLayout&&i.doPostLayout(),i.tilingPostLayout&&i.tilingPostLayout(),i.isLayoutFinished=!0,r.options.eles.nodes().positions(d),a(),r.cy.one("layoutstop",r.options.stop),r.cy.trigger({type:"layoutstop",layout:r}),e&&cancelAnimationFrame(e),void(t=!1);var c=r.layout.getPositionsData();n.eles.nodes().positions((function(t,e){if("number"==typeof t&&(t=e),!t.isParent()){for(var n=t.id(),i=c[n],r=t;null==i&&(i=c[r.data("parent")]||c["DummyCompound_"+r.data("parent")],c[n]=i,null!=(r=r.parent()[0])););return null!=i?{x:i.x,y:i.y}:{x:t.position("x"),y:t.position("y")}}})),a(),e=requestAnimationFrame(o)};return i.addListener("layoutstarted",(function(){"during"===r.options.animate&&(e=requestAnimationFrame(p))})),i.runLayout(),"during"!==this.options.animate&&(r.options.eles.nodes().not(":parent").layoutPositions(r,r.options,d),t=!1),this},g.prototype.getTopMostNodes=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].id()]=!0;return t.filter((function(t,n){"number"==typeof t&&(t=n);for(var i=t.parent()[0];null!=i;){if(e[i.id()])return!1;i=i.parent()[0]}return!0}))},g.prototype.processChildrenList=function(t,e,n){for(var i=e.length,r=0;r<i;r++){var o,s,c=e[r],g=c.children(),u=c.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if((o=null!=c.outerWidth()&&null!=c.outerHeight()?t.add(new a(n.graphManager,new h(c.position("x")-u.w/2,c.position("y")-u.h/2),new l(parseFloat(u.w),parseFloat(u.h)))):t.add(new a(this.graphManager))).id=c.data("id"),o.paddingLeft=parseInt(c.css("padding")),o.paddingTop=parseInt(c.css("padding")),o.paddingRight=parseInt(c.css("padding")),o.paddingBottom=parseInt(c.css("padding")),this.options.nodeDimensionsIncludeLabels&&c.isParent()){var d=c.boundingBox({includeLabels:!0,includeNodes:!1}).w,p=c.boundingBox({includeLabels:!0,includeNodes:!1}).h,f=c.css("text-halign");o.labelWidth=d,o.labelHeight=p,o.labelPos=f}this.idToLNode[c.data("id")]=o,isNaN(o.rect.x)&&(o.rect.x=0),isNaN(o.rect.y)&&(o.rect.y=0),null!=g&&g.length>0&&(s=n.getGraphManager().add(n.newGraph(),o),this.processChildrenList(s,g,n))}},g.prototype.stop=function(){return this.stopped=!0,this};var d=function(t){t("layout","cose-bilkent",g)};"undefined"!=typeof cytoscape&&d(cytoscape),t.exports=d}]))),y.exports));var T=function(){var e=t((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),n=[1,4],i=[1,13],r=[1,12],o=[1,15],s=[1,16],a=[1,20],h=[1,19],l=[6,7,8],c=[1,26],g=[1,24],u=[1,25],d=[6,7,11],p=[1,6,13,15,16,19,22],f=[1,33],y=[1,34],E=[1,6,7,11,13,15,16,19,22],m={trace:t((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:t((function(t,e,n,i,r,o,s){var a=o.length-1;switch(r){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",o[a].id),i.addNode(o[a-1].length,o[a].id,o[a].descr,o[a].type);break;case 16:i.getLogger().trace("Icon: ",o[a]),i.decorateNode({icon:o[a]});break;case 17:case 21:i.decorateNode({class:o[a]});break;case 18:i.getLogger().trace("SPACELIST");break;case 19:i.getLogger().trace("Node: ",o[a].id),i.addNode(0,o[a].id,o[a].descr,o[a].type);break;case 20:i.decorateNode({icon:o[a]});break;case 25:i.getLogger().trace("node found ..",o[a-2]),this.$={id:o[a-1],descr:o[a-1],type:i.getType(o[a-2],o[a])};break;case 26:this.$={id:o[a],descr:o[a],type:i.nodeType.DEFAULT};break;case 27:i.getLogger().trace("node found ..",o[a-3]),this.$={id:o[a-3],descr:o[a-1],type:i.getType(o[a-2],o[a])}}}),"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:n},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:n},{6:i,7:[1,10],9:9,12:11,13:r,14:14,15:o,16:s,17:17,18:18,19:a,22:h},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:i,12:21,13:r,14:14,15:o,16:s,17:17,18:18,19:a,22:h},{6:i,9:22,12:11,13:r,14:14,15:o,16:s,17:17,18:18,19:a,22:h},{6:c,7:g,10:23,11:u},e(d,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:a,22:h}),e(d,[2,18]),e(d,[2,19]),e(d,[2,20]),e(d,[2,21]),e(d,[2,23]),e(d,[2,24]),e(d,[2,26],{19:[1,30]}),{20:[1,31]},{6:c,7:g,10:32,11:u},{1:[2,7],6:i,12:21,13:r,14:14,15:o,16:s,17:17,18:18,19:a,22:h},e(p,[2,14],{7:f,11:y}),e(E,[2,8]),e(E,[2,9]),e(E,[2,10]),e(d,[2,15]),e(d,[2,16]),e(d,[2,17]),{20:[1,35]},{21:[1,36]},e(p,[2,13],{7:f,11:y}),e(E,[2,11]),e(E,[2,12]),{21:[1,37]},e(d,[2,25]),e(d,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:t((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:t((function(e){var n=this,i=[0],r=[],o=[null],s=[],a=this.table,h="",l=0,c=0,g=s.slice.call(arguments,1),u=Object.create(this.lexer),d={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(d.yy[p]=this.yy[p]);u.setInput(e,d.yy),d.yy.lexer=u,d.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var f=u.yylloc;s.push(f);var y=u.options&&u.options.ranges;function E(){var t;return"number"!=typeof(t=r.pop()||u.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){i.length=i.length-2*t,o.length=o.length-t,s.length=s.length-t}),"popStack"),t(E,"lex");for(var m,_,v,N,A,L,T,O,D={};;){if(_=i[i.length-1],this.defaultActions[_]?v=this.defaultActions[_]:(null==m&&(m=E()),v=a[_]&&a[_][m]),void 0===v||!v.length||!v[0]){var I="";for(A in O=[],a[_])this.terminals_[A]&&A>2&&O.push("'"+this.terminals_[A]+"'");I=u.showPosition?"Parse error on line "+(l+1)+":\n"+u.showPosition()+"\nExpecting "+O.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(I,{text:u.match,token:this.terminals_[m]||m,line:u.yylineno,loc:f,expected:O})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+m);switch(v[0]){case 1:i.push(m),o.push(u.yytext),s.push(u.yylloc),i.push(v[1]),m=null,c=u.yyleng,h=u.yytext,l=u.yylineno,f=u.yylloc;break;case 2:if(L=this.productions_[v[1]][1],D.$=o[o.length-L],D._$={first_line:s[s.length-(L||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(L||1)].first_column,last_column:s[s.length-1].last_column},y&&(D._$.range=[s[s.length-(L||1)].range[0],s[s.length-1].range[1]]),void 0!==(N=this.performAction.apply(D,[h,c,l,d.yy,v[1],o,s].concat(g))))return N;L&&(i=i.slice(0,-1*L*2),o=o.slice(0,-1*L),s=s.slice(0,-1*L)),i.push(this.productions_[v[1]][0]),o.push(D.$),s.push(D._$),T=a[i[i.length-2]][i[i.length-1]],i.push(T);break;case 3:return!0}}return!0}),"parse")},_=function(){return{EOF:1,parseError:t((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:t((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:t((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t}),"input"),unput:t((function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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),n.length-1&&(this.yylineno-=n.length-1);var r=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:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:t((function(){return this._more=!0,this}),"more"),reject:t((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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:t((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:t((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:t((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:t((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:t((function(t,e){var n,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in r)this[o]=r[o];return!1}return!1}),"test_match"),next:t((function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;o<r.length;o++)if((n=this._input.match(this.rules[r[o]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,r[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:t((function(){var t=this.next();return t||this.lex()}),"lex"),begin:t((function(t){this.conditionStack.push(t)}),"begin"),popState:t((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:t((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:t((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:t((function(t){this.begin(t)}),"pushState"),stateStackSize:t((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:t((function(t,e,n,i){switch(n){case 0:return t.getLogger().trace("Found comment",e.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:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.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:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.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 v(){this.yy={}}return m.lexer=_,t(v,"Parser"),v.prototype=m,m.Parser=v,new v}();T.parser=T;var O=T,D=[],I=0,w={},R=t((()=>{D=[],I=0,w={}}),"clear"),C=t((function(t){for(let e=D.length-1;e>=0;e--)if(D[e].level<t)return D[e];return null}),"getParent"),M=t((()=>D.length>0?D[0]:null),"getMindmap"),x=t(((t,i,r,a)=>{var h,l;e.info("addNode",t,i,r,a);const c=n();let g=(null==(h=c.mindmap)?void 0:h.padding)??o.mindmap.padding;switch(a){case G.ROUNDED_RECT:case G.RECT:case G.HEXAGON:g*=2}const u={id:I++,nodeId:s(i,c),level:t,descr:s(r,c),type:a,children:[],width:(null==(l=c.mindmap)?void 0:l.maxNodeWidth)??o.mindmap.maxNodeWidth,padding:g},d=C(t);if(d)d.children.push(u),D.push(u);else{if(0!==D.length)throw new Error('There can be only one root. No parent could be found for ("'+u.descr+'")');D.push(u)}}),"addNode"),G={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},S={clear:R,addNode:x,getMindmap:M,nodeType:G,getType:t(((t,n)=>{switch(e.debug("In get type",t,n),t){case"[":return G.RECT;case"(":return")"===n?G.ROUNDED_RECT:G.CLOUD;case"((":return G.CIRCLE;case")":return G.CLOUD;case"))":return G.BANG;case"{{":return G.HEXAGON;default:return G.DEFAULT}}),"getType"),setElementForId:t(((t,e)=>{w[t]=e}),"setElementForId"),decorateNode:t((t=>{if(!t)return;const e=n(),i=D[D.length-1];t.icon&&(i.icon=s(t.icon,e)),t.class&&(i.class=s(t.class,e))}),"decorateNode"),type2Str:t((t=>{switch(t){case G.DEFAULT:return"no-border";case G.RECT:return"rect";case G.ROUNDED_RECT:return"rounded-rect";case G.CIRCLE:return"circle";case G.CLOUD:return"cloud";case G.BANG:return"bang";case G.HEXAGON:return"hexgon";default:return"no-border"}}),"type2Str"),getLogger:t((()=>e),"getLogger"),getElementById:t((t=>w[t]),"getElementById")},b=t((function(t,e,n,i){e.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+t.type2Str(n.type)).attr("d",`M0 ${n.height-5} v${10-n.height} q0,-5 5,-5 h${n.width-10} q5,0 5,5 v${n.height-5} H0 Z`),e.append("line").attr("class","node-line-"+i).attr("x1",0).attr("y1",n.height).attr("x2",n.width).attr("y2",n.height)}),"defaultBkg"),F=t((function(t,e,n){e.append("rect").attr("id","node-"+n.id).attr("class","node-bkg node-"+t.type2Str(n.type)).attr("height",n.height).attr("width",n.width)}),"rectBkg"),P=t((function(t,e,n){const i=n.width,r=n.height,o=.15*i,s=.25*i,a=.35*i,h=.2*i;e.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+t.type2Str(n.type)).attr("d",`M0 0 a${o},${o} 0 0,1 ${.25*i},${-1*i*.1}\n a${a},${a} 1 0,1 ${.4*i},${-1*i*.1}\n a${s},${s} 1 0,1 ${.35*i},${1*i*.2}\n\n a${o},${o} 1 0,1 ${.15*i},${1*r*.35}\n a${h},${h} 1 0,1 ${-1*i*.15},${1*r*.65}\n\n a${s},${o} 1 0,1 ${-1*i*.25},${.15*i}\n a${a},${a} 1 0,1 ${-1*i*.5},0\n a${o},${o} 1 0,1 ${-1*i*.25},${-1*i*.15}\n\n a${o},${o} 1 0,1 ${-1*i*.1},${-1*r*.35}\n a${h},${h} 1 0,1 ${.1*i},${-1*r*.65}\n\n H0 V0 Z`)}),"cloudBkg"),U=t((function(t,e,n){const i=n.width,r=n.height,o=.15*i;e.append("path").attr("id","node-"+n.id).attr("class","node-bkg node-"+t.type2Str(n.type)).attr("d",`M0 0 a${o},${o} 1 0,0 ${.25*i},${-1*r*.1}\n a${o},${o} 1 0,0 ${.25*i},0\n a${o},${o} 1 0,0 ${.25*i},0\n a${o},${o} 1 0,0 ${.25*i},${1*r*.1}\n\n a${o},${o} 1 0,0 ${.15*i},${1*r*.33}\n a${.8*o},${.8*o} 1 0,0 0,${1*r*.34}\n a${o},${o} 1 0,0 ${-1*i*.15},${1*r*.33}\n\n a${o},${o} 1 0,0 ${-1*i*.25},${.15*r}\n a${o},${o} 1 0,0 ${-1*i*.25},0\n a${o},${o} 1 0,0 ${-1*i*.25},0\n a${o},${o} 1 0,0 ${-1*i*.25},${-1*r*.15}\n\n a${o},${o} 1 0,0 ${-1*i*.1},${-1*r*.33}\n a${.8*o},${.8*o} 1 0,0 0,${-1*r*.34}\n a${o},${o} 1 0,0 ${.1*i},${-1*r*.33}\n\n H0 V0 Z`)}),"bangBkg"),Y=t((function(t,e,n){e.append("circle").attr("id","node-"+n.id).attr("class","node-bkg node-"+t.type2Str(n.type)).attr("r",n.width/2)}),"circleBkg");function k(t,e,n,i,r){return t.insert("polygon",":first-child").attr("points",i.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+(r.width-e)/2+", "+n+")")}t(k,"insertPolygonShape");var X=t((function(t,e,n){const i=n.height,r=i/4,o=n.width-n.padding+2*r;k(e,o,i,[{x:r,y:0},{x:o-r,y:0},{x:o,y:-i/2},{x:o-r,y:-i},{x:r,y:-i},{x:0,y:-i/2}],n)}),"hexagonBkg"),B=t((function(t,e,n){e.append("rect").attr("id","node-"+n.id).attr("class","node-bkg node-"+t.type2Str(n.type)).attr("height",n.height).attr("rx",n.padding).attr("ry",n.padding).attr("width",n.width)}),"roundedRectBkg"),$=t((async function(t,e,n,i,r){const o=r.htmlLabels,s=i%11,a=e.append("g");n.section=s;let h="section-"+s;s<0&&(h+=" section-root"),a.attr("class",(n.class?n.class+" ":"")+"mindmap-node "+h);const l=a.append("g"),u=a.append("g"),d=n.descr.replace(/(<br\/*>)/g,"\n");await c(u,d,{useHtmlLabels:o,width:n.width,classes:"mindmap-node-label"},r),o||u.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle");const p=u.node().getBBox(),[f]=g(r.fontSize);if(n.height=p.height+1.1*f*.5+n.padding,n.width=p.width+2*n.padding,n.icon)if(n.type===t.nodeType.CIRCLE){n.height+=50,n.width+=50;a.append("foreignObject").attr("height","50px").attr("width",n.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+n.icon),u.attr("transform","translate("+n.width/2+", "+(n.height/2-1.5*n.padding)+")")}else{n.width+=50;const t=n.height;n.height=Math.max(t,60);const e=Math.abs(n.height-t);a.append("foreignObject").attr("width","60px").attr("height",n.height).attr("style","text-align: center;margin-top:"+e/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+n.icon),u.attr("transform","translate("+(25+n.width/2)+", "+(e/2+n.padding/2)+")")}else if(o){const t=(n.width-p.width)/2,e=(n.height-p.height)/2;u.attr("transform","translate("+t+", "+e+")")}else{const t=n.width/2,e=n.padding/2;u.attr("transform","translate("+t+", "+e+")")}switch(n.type){case t.nodeType.DEFAULT:b(t,l,n,s);break;case t.nodeType.ROUNDED_RECT:B(t,l,n,s);break;case t.nodeType.RECT:F(t,l,n,s);break;case t.nodeType.CIRCLE:l.attr("transform","translate("+n.width/2+", "+ +n.height/2+")"),Y(t,l,n,s);break;case t.nodeType.CLOUD:P(t,l,n,s);break;case t.nodeType.BANG:U(t,l,n,s);break;case t.nodeType.HEXAGON:X(t,l,n,s)}return t.setElementForId(n.id,a),n.height}),"drawNode"),H=t((function(t,e){const n=t.getElementById(e.id),i=e.x||0,r=e.y||0;n.attr("transform","translate("+i+","+r+")")}),"positionNode");async function W(t,e,n,i,r){await $(t,e,n,i,r),n.children&&await Promise.all(n.children.map(((n,o)=>W(t,e,n,i<0?o:i,r))))}function j(t,n){n.edges().map(((n,i)=>{const r=n.data();if(n[0]._private.bodyBounds){const o=n[0]._private.rscratch;e.trace("Edge: ",i,r),t.insert("path").attr("d",`M ${o.startX},${o.startY} L ${o.midX},${o.midY} L${o.endX},${o.endY} `).attr("class","edge section-edge-"+r.section+" edge-depth-"+r.depth)}}))}function V(t,e,n,i){e.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:i,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach((r=>{V(r,e,n,i+1),e.add({group:"edges",data:{id:`${t.id}_${r.id}`,source:t.id,target:r.id,depth:i,section:r.section}})}))}function z(t,n){return new Promise((i=>{const r=p("body").append("div").attr("id","cy").attr("style","display:none"),o=u({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),V(t,o,n,0),o.nodes().forEach((function(t){t.layoutDimensions=()=>{const e=t.data();return{w:e.width,h:e.height}}})),o.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),o.ready((t=>{e.info("Ready",t),i(o)}))}))}function q(t,n){n.nodes().map(((n,i)=>{const r=n.data();r.x=n.position().x,r.y=n.position().y,H(t,r);const o=t.getElementById(r.nodeId);e.info("Id:",i,"Position: (",n.position().x,", ",n.position().y,")",r),o.attr("transform",`translate(${n.position().x-r.width/2}, ${n.position().y-r.height/2})`),o.attr("attr",`apa-${i})`)}))}u.use(L),t(W,"drawNodes"),t(j,"drawEdges"),t(V,"addNodes"),t(z,"layoutMindmap"),t(q,"positionNodes");var Z={draw:t((async(t,s,a,h)=>{var l,c;e.debug("Rendering mindmap diagram\n"+t);const g=h.db,u=g.getMindmap();if(!u)return;const d=n();d.htmlLabels=!1;const p=i(s),f=p.append("g");f.attr("class","mindmap-edges");const y=p.append("g");y.attr("class","mindmap-nodes"),await W(g,y,u,-1,d);const E=await z(u,d);j(f,E),q(g,E),r(void 0,p,(null==(l=d.mindmap)?void 0:l.padding)??o.mindmap.padding,(null==(c=d.mindmap)?void 0:c.useMaxWidth)??o.mindmap.useMaxWidth)}),"draw")},Q=t((t=>{let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)t["lineColor"+n]=t["lineColor"+n]||t["cScaleInv"+n],a(t["lineColor"+n])?t["lineColor"+n]=h(t["lineColor"+n],20):t["lineColor"+n]=l(t["lineColor"+n],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const i=""+(17-3*n);e+=`\n .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} polygon, .section-${n-1} path {\n fill: ${t["cScale"+n]};\n }\n .section-${n-1} text {\n fill: ${t["cScaleLabel"+n]};\n }\n .node-icon-${n-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+n]};\n }\n .section-edge-${n-1}{\n stroke: ${t["cScale"+n]};\n }\n .edge-depth-${n-1}{\n stroke-width: ${i};\n }\n .section-${n-1} line {\n stroke: ${t["cScaleInv"+n]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return e}),"genSections"),K={db:S,renderer:Z,parser:O,styles:t((t=>`\n .edge {\n stroke-width: 3;\n }\n ${Q(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`),"getStyles")};export{K as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as t}from"./chunk-4BMEZGHF-BiuHmakw.js";import{_ as e,g as a,s as n,a as i,b as r,q as s,p as o,l,c as p,E as c,I as d,O as u,d as f,y as m,G as g}from"./mermaid-iAIjIGjg.js";import{p as h}from"./radar-MK3ICKWK-DZtMJyk-.js";import"./transform-CdY8z5kT.js";import{d as x}from"./arc-B5qYPUYs.js";import{o as y}from"./ordinal-DDUp3AbE.js";import{b as w,t as S,n as $}from"./step-xJWGRC3d.js";import"./index-QV1pM6V_.js";import"./_baseEach-BLu58TpK.js";import"./_baseUniq-CsVuRotB.js";import"./min-BGi6L9wq.js";import"./_baseMap-BwlisKUj.js";import"./clone-C8tCSJw7.js";import"./init-DLRA0X12.js";function b(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function A(t){return t}var T=g.pie,v={sections:new Map,showData:!1},C=v.sections,D=v.showData,j=structuredClone(T),M={getConfig:e((()=>structuredClone(j)),"getConfig"),clear:e((()=>{C=new Map,D=v.showData,m()}),"clear"),setDiagramTitle:o,getDiagramTitle:s,setAccTitle:r,getAccTitle:i,setAccDescription:n,getAccDescription:a,addSection:e((({label:t,value:e})=>{C.has(t)||(C.set(t,e),l.debug(`added new section: ${t}, with value: ${e}`))}),"addSection"),getSections:e((()=>C),"getSections"),setShowData:e((t=>{D=t}),"setShowData"),getShowData:e((()=>D),"getShowData")},k=e(((e,a)=>{t(e,a),a.setShowData(e.showData),e.sections.map(a.addSection)}),"populateDb"),O={parse:e((async t=>{const e=await h("pie",t);l.debug(e),k(e,M)}),"parse")},z=e((t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${t.pieOuterStrokeColor};\n stroke-width: ${t.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`),"getStyles"),W=e((t=>{const e=[...t.entries()].map((t=>({label:t[0],value:t[1]}))).sort(((t,e)=>e.value-t.value));return function(){var t=A,e=b,a=null,n=w(0),i=w(S),r=w(0);function s(s){var o,l,p,c,d,u=(s=$(s)).length,f=0,m=new Array(u),g=new Array(u),h=+n.apply(this,arguments),x=Math.min(S,Math.max(-S,i.apply(this,arguments)-h)),y=Math.min(Math.abs(x)/u,r.apply(this,arguments)),w=y*(x<0?-1:1);for(o=0;o<u;++o)(d=g[m[o]=o]=+t(s[o],o,s))>0&&(f+=d);for(null!=e?m.sort((function(t,a){return e(g[t],g[a])})):null!=a&&m.sort((function(t,e){return a(s[t],s[e])})),o=0,p=f?(x-u*w)/f:0;o<u;++o,h=c)l=m[o],c=h+((d=g[l])>0?d*p:0)+w,g[l]={data:s[l],index:o,value:d,startAngle:h,endAngle:c,padAngle:y};return g}return s.value=function(e){return arguments.length?(t="function"==typeof e?e:w(+e),s):t},s.sortValues=function(t){return arguments.length?(e=t,a=null,s):e},s.sort=function(t){return arguments.length?(a=t,e=null,s):a},s.startAngle=function(t){return arguments.length?(n="function"==typeof t?t:w(+t),s):n},s.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:w(+t),s):i},s.padAngle=function(t){return arguments.length?(r="function"==typeof t?t:w(+t),s):r},s}().value((t=>t.value))(e)}),"createPieArcs"),F={parser:O,db:M,renderer:{draw:e(((t,e,a,n)=>{l.debug("rendering pie chart\n"+t);const i=n.db,r=p(),s=c(i.getConfig(),r.pie),o=18,m=450,g=m,h=d(e),w=h.append("g");w.attr("transform","translate(225,225)");const{themeVariables:S}=r;let[$]=u(S.pieOuterStrokeWidth);$??($=2);const b=s.textPosition,A=Math.min(g,m)/2-40,T=x().innerRadius(0).outerRadius(A),v=x().innerRadius(A*b).outerRadius(A*b);w.append("circle").attr("cx",0).attr("cy",0).attr("r",A+$/2).attr("class","pieOuterCircle");const C=i.getSections(),D=W(C),j=[S.pie1,S.pie2,S.pie3,S.pie4,S.pie5,S.pie6,S.pie7,S.pie8,S.pie9,S.pie10,S.pie11,S.pie12],M=y(j);w.selectAll("mySlices").data(D).enter().append("path").attr("d",T).attr("fill",(t=>M(t.data.label))).attr("class","pieCircle");let k=0;C.forEach((t=>{k+=t})),w.selectAll("mySlices").data(D).enter().append("text").text((t=>(t.data.value/k*100).toFixed(0)+"%")).attr("transform",(t=>"translate("+v.centroid(t)+")")).style("text-anchor","middle").attr("class","slice"),w.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");const O=w.selectAll(".legend").data(M.domain()).enter().append("g").attr("class","legend").attr("transform",((t,e)=>"translate(216,"+(22*e-22*M.domain().length/2)+")"));O.append("rect").attr("width",o).attr("height",o).style("fill",M).style("stroke",M),O.data(D).append("text").attr("x",22).attr("y",14).text((t=>{const{label:e,value:a}=t.data;return i.getShowData()?`${e} [${a}]`:e}));const z=512+Math.max(...O.selectAll("text").nodes().map((t=>(null==t?void 0:t.getBoundingClientRect().width)??0)));h.attr("viewBox",`0 0 ${z} 450`),f(h,m,z,s.useMaxWidth)}),"draw")},styles:z};export{F as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t,e;import{_ as i,s as a,g as n,q as s,p as r,a as o,b as l,c as h,l as c,d,y as u,G as x,L as g,h as f}from"./mermaid-iAIjIGjg.js";import{s as p}from"./transform-CdY8z5kT.js";import{l as y}from"./linear-CVoZ1MzX.js";import"./index-QV1pM6V_.js";import"./step-xJWGRC3d.js";import"./init-DLRA0X12.js";var T=function(){var t=i((function(t,e,i,a){for(i=i||{},a=t.length;a--;i[t[a]]=e);return i}),"o"),e=[1,3],a=[1,4],n=[1,5],s=[1,6],r=[1,7],o=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],h=[55,56,57],c=[2,36],d=[1,37],u=[1,36],x=[1,38],g=[1,35],f=[1,43],p=[1,41],y=[1,14],T=[1,23],m=[1,18],q=[1,19],A=[1,20],_=[1,21],b=[1,22],S=[1,24],k=[1,25],F=[1,26],P=[1,27],v=[1,28],C=[1,29],L=[1,32],E=[1,33],D=[1,34],z=[1,39],I=[1,40],w=[1,42],N=[1,44],W=[1,62],B=[1,61],R=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],$=[1,65],U=[1,66],Q=[1,67],O=[1,68],X=[1,69],H=[1,70],M=[1,71],Y=[1,72],j=[1,73],G=[1,74],K=[1,75],V=[1,76],Z=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],tt=[1,91],et=[1,92],it=[1,99],at=[1,93],nt=[1,96],st=[1,94],rt=[1,95],ot=[1,97],lt=[1,98],ht=[1,102],ct=[10,55,56,57],dt=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],ut={trace:i((function(){}),"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:i((function(t,e,i,a,n,s,r){var o=s.length-1;switch(n){case 23:case 68:this.$=s[o];break;case 24:case 69:this.$=s[o-1]+""+s[o];break;case 26:this.$=s[o-1]+s[o];break;case 27:this.$=[s[o].trim()];break;case 28:s[o-2].push(s[o].trim()),this.$=s[o-2];break;case 29:this.$=s[o-4],a.addClass(s[o-2],s[o]);break;case 37:this.$=[];break;case 42:this.$=s[o].trim(),a.setDiagramTitle(this.$);break;case 43:this.$=s[o].trim(),a.setAccTitle(this.$);break;case 44:case 45:this.$=s[o].trim(),a.setAccDescription(this.$);break;case 46:a.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 47:a.addPoint(s[o-3],"",s[o-1],s[o],[]);break;case 48:a.addPoint(s[o-4],s[o-3],s[o-1],s[o],[]);break;case 49:a.addPoint(s[o-4],"",s[o-2],s[o-1],s[o]);break;case 50:a.addPoint(s[o-5],s[o-4],s[o-2],s[o-1],s[o]);break;case 51:a.setXAxisLeftText(s[o-2]),a.setXAxisRightText(s[o]);break;case 52:s[o-1].text+=" ⟶ ",a.setXAxisLeftText(s[o-1]);break;case 53:a.setXAxisLeftText(s[o]);break;case 54:a.setYAxisBottomText(s[o-2]),a.setYAxisTopText(s[o]);break;case 55:s[o-1].text+=" ⟶ ",a.setYAxisBottomText(s[o-1]);break;case 56:a.setYAxisBottomText(s[o]);break;case 57:a.setQuadrant1Text(s[o]);break;case 58:a.setQuadrant2Text(s[o]);break;case 59:a.setQuadrant3Text(s[o]);break;case 60:a.setQuadrant4Text(s[o]);break;case 64:case 66:this.$={text:s[o],type:"text"};break;case 65:this.$={text:s[o-1].text+""+s[o],type:s[o-1].type};break;case 67:this.$={text:s[o],type:"markdown"}}}),"anonymous"),table:[{18:e,26:1,27:2,28:a,55:n,56:s,57:r},{1:[3]},{18:e,26:8,27:2,28:a,55:n,56:s,57:r},{18:e,26:9,27:2,28:a,55:n,56:s,57:r},t(o,[2,33],{29:10}),t(l,[2,61]),t(l,[2,62]),t(l,[2,63]),{1:[2,30]},{1:[2,31]},t(h,c,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:v,54:C,60:L,61:E,63:D,64:z,65:I,66:w,67:N}),t(o,[2,34]),{27:45,55:n,56:s,57:r},t(h,[2,37]),t(h,c,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:d,5:u,10:x,12:g,13:f,14:p,18:y,25:T,35:m,37:q,39:A,41:_,42:b,48:S,50:k,51:F,52:P,53:v,54:C,60:L,61:E,63:D,64:z,65:I,66:w,67:N}),t(h,[2,39]),t(h,[2,40]),t(h,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(h,[2,45]),t(h,[2,46]),{18:[1,50]},{4:d,5:u,10:x,12:g,13:f,14:p,43:51,58:31,60:L,61:E,63:D,64:z,65:I,66:w,67:N},{4:d,5:u,10:x,12:g,13:f,14:p,43:52,58:31,60:L,61:E,63:D,64:z,65:I,66:w,67:N},{4:d,5:u,10:x,12:g,13:f,14:p,43:53,58:31,60:L,61:E,63:D,64:z,65:I,66:w,67:N},{4:d,5:u,10:x,12:g,13:f,14:p,43:54,58:31,60:L,61:E,63:D,64:z,65:I,66:w,67:N},{4:d,5:u,10:x,12:g,13:f,14:p,43:55,58:31,60:L,61:E,63:D,64:z,65:I,66:w,67:N},{4:d,5:u,10:x,12:g,13:f,14:p,43:56,58:31,60:L,61:E,63:D,64:z,65:I,66:w,67:N},{4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,44:[1,57],47:[1,58],58:60,59:59,63:D,64:z,65:I,66:w,67:N},t(R,[2,64]),t(R,[2,66]),t(R,[2,67]),t(R,[2,70]),t(R,[2,71]),t(R,[2,72]),t(R,[2,73]),t(R,[2,74]),t(R,[2,75]),t(R,[2,76]),t(R,[2,77]),t(R,[2,78]),t(R,[2,79]),t(R,[2,80]),t(o,[2,35]),t(h,[2,38]),t(h,[2,42]),t(h,[2,43]),t(h,[2,44]),{3:64,4:$,5:U,6:Q,7:O,8:X,9:H,10:M,11:Y,12:j,13:G,14:K,15:V,21:63},t(h,[2,53],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,49:[1,77],63:D,64:z,65:I,66:w,67:N}),t(h,[2,56],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,49:[1,78],63:D,64:z,65:I,66:w,67:N}),t(h,[2,57],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,63:D,64:z,65:I,66:w,67:N}),t(h,[2,58],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,63:D,64:z,65:I,66:w,67:N}),t(h,[2,59],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,63:D,64:z,65:I,66:w,67:N}),t(h,[2,60],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,63:D,64:z,65:I,66:w,67:N}),{45:[1,79]},{44:[1,80]},t(R,[2,65]),t(R,[2,81]),t(R,[2,82]),t(R,[2,83]),{3:82,4:$,5:U,6:Q,7:O,8:X,9:H,10:M,11:Y,12:j,13:G,14:K,15:V,18:[1,81]},t(Z,[2,23]),t(Z,[2,1]),t(Z,[2,2]),t(Z,[2,3]),t(Z,[2,4]),t(Z,[2,5]),t(Z,[2,6]),t(Z,[2,7]),t(Z,[2,8]),t(Z,[2,9]),t(Z,[2,10]),t(Z,[2,11]),t(Z,[2,12]),t(h,[2,52],{58:31,43:83,4:d,5:u,10:x,12:g,13:f,14:p,60:L,61:E,63:D,64:z,65:I,66:w,67:N}),t(h,[2,55],{58:31,43:84,4:d,5:u,10:x,12:g,13:f,14:p,60:L,61:E,63:D,64:z,65:I,66:w,67:N}),{46:[1,85]},{45:[1,86]},{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:88,23:87},t(Z,[2,24]),t(h,[2,51],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,63:D,64:z,65:I,66:w,67:N}),t(h,[2,54],{59:59,58:60,4:d,5:u,8:W,10:x,12:g,13:f,14:p,18:B,63:D,64:z,65:I,66:w,67:N}),t(h,[2,47],{22:88,16:89,23:100,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{46:[1,101]},t(h,[2,29],{10:ht}),t(ct,[2,27],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),t(dt,[2,25]),t(dt,[2,13]),t(dt,[2,14]),t(dt,[2,15]),t(dt,[2,16]),t(dt,[2,17]),t(dt,[2,18]),t(dt,[2,19]),t(dt,[2,20]),t(dt,[2,21]),t(dt,[2,22]),t(h,[2,49],{10:ht}),t(h,[2,48],{22:88,16:89,23:104,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt}),{4:J,5:tt,6:et,8:it,11:at,13:nt,16:89,17:st,18:rt,19:ot,20:lt,22:105},t(dt,[2,26]),t(h,[2,50],{10:ht}),t(ct,[2,28],{16:103,4:J,5:tt,6:et,8:it,11:at,13:nt,17:st,18:rt,19:ot,20:lt})],defaultActions:{8:[2,30],9:[2,31]},parseError:i((function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)}),"parseError"),parse:i((function(t){var e=this,a=[0],n=[],s=[null],r=[],o=this.table,l="",h=0,c=0,d=r.slice.call(arguments,1),u=Object.create(this.lexer),x={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(x.yy[g]=this.yy[g]);u.setInput(t,x.yy),x.yy.lexer=u,x.yy.parser=this,void 0===u.yylloc&&(u.yylloc={});var f=u.yylloc;r.push(f);var p=u.options&&u.options.ranges;function y(){var t;return"number"!=typeof(t=n.pop()||u.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof x.yy.parseError?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i((function(t){a.length=a.length-2*t,s.length=s.length-t,r.length=r.length-t}),"popStack"),i(y,"lex");for(var T,m,q,A,_,b,S,k,F={};;){if(m=a[a.length-1],this.defaultActions[m]?q=this.defaultActions[m]:(null==T&&(T=y()),q=o[m]&&o[m][T]),void 0===q||!q.length||!q[0]){var P="";for(_ in k=[],o[m])this.terminals_[_]&&_>2&&k.push("'"+this.terminals_[_]+"'");P=u.showPosition?"Parse error on line "+(h+1)+":\n"+u.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[T]||T)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==T?"end of input":"'"+(this.terminals_[T]||T)+"'"),this.parseError(P,{text:u.match,token:this.terminals_[T]||T,line:u.yylineno,loc:f,expected:k})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+m+", token: "+T);switch(q[0]){case 1:a.push(T),s.push(u.yytext),r.push(u.yylloc),a.push(q[1]),T=null,c=u.yyleng,l=u.yytext,h=u.yylineno,f=u.yylloc;break;case 2:if(b=this.productions_[q[1]][1],F.$=s[s.length-b],F._$={first_line:r[r.length-(b||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(b||1)].first_column,last_column:r[r.length-1].last_column},p&&(F._$.range=[r[r.length-(b||1)].range[0],r[r.length-1].range[1]]),void 0!==(A=this.performAction.apply(F,[l,c,h,x.yy,q[1],s,r].concat(d))))return A;b&&(a=a.slice(0,-1*b*2),s=s.slice(0,-1*b),r=r.slice(0,-1*b)),a.push(this.productions_[q[1]][0]),s.push(F.$),r.push(F._$),S=o[a[a.length-2]][a[a.length-1]],a.push(S);break;case 3:return!0}}return!0}),"parse")},xt=function(){return{EOF:1,parseError:i((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:i((function(t,e){return this.yy=e||this.yy||{},this._input=t,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:i((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t}),"input"),unput:i((function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var a=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),i.length-1&&(this.yylineno-=i.length-1);var n=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:i?(i.length===a.length?this.yylloc.first_column:0)+a[a.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:i((function(){return this._more=!0,this}),"more"),reject:i((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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:i((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:i((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:i((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:i((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:i((function(t,e){var i,a,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(a=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=a.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:a?a[a.length-1].length-a[a.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var s in n)this[s]=n[s];return!1}return!1}),"test_match"),next:i((function(){if(this.done)return this.EOF;var t,e,i,a;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),s=0;s<n.length;s++)if((i=this._input.match(this.rules[n[s]]))&&(!e||i[0].length>e[0].length)){if(e=i,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[s])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:i((function(){var t=this.next();return t||this.lex()}),"lex"),begin:i((function(t){this.conditionStack.push(t)}),"begin"),popState:i((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:i((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:i((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:i((function(t){this.begin(t)}),"pushState"),stateStackSize:i((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:i((function(t,e,i,a){switch(i){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}}),"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}}();function gt(){this.yy={}}return ut.lexer=xt,i(gt,"Parser"),gt.prototype=ut,ut.Parser=gt,new gt}();T.parser=T;var m=T,q=g(),A=(i(t=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var t,e,i,a,n,s,r,o,l,h,c,d,u,g,f,p,y,T;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:(null==(t=x.quadrantChart)?void 0:t.chartWidth)||500,chartWidth:(null==(e=x.quadrantChart)?void 0:e.chartHeight)||500,titlePadding:(null==(i=x.quadrantChart)?void 0:i.titlePadding)||10,titleFontSize:(null==(a=x.quadrantChart)?void 0:a.titleFontSize)||20,quadrantPadding:(null==(n=x.quadrantChart)?void 0:n.quadrantPadding)||5,xAxisLabelPadding:(null==(s=x.quadrantChart)?void 0:s.xAxisLabelPadding)||5,yAxisLabelPadding:(null==(r=x.quadrantChart)?void 0:r.yAxisLabelPadding)||5,xAxisLabelFontSize:(null==(o=x.quadrantChart)?void 0:o.xAxisLabelFontSize)||16,yAxisLabelFontSize:(null==(l=x.quadrantChart)?void 0:l.yAxisLabelFontSize)||16,quadrantLabelFontSize:(null==(h=x.quadrantChart)?void 0:h.quadrantLabelFontSize)||16,quadrantTextTopPadding:(null==(c=x.quadrantChart)?void 0:c.quadrantTextTopPadding)||5,pointTextPadding:(null==(d=x.quadrantChart)?void 0:d.pointTextPadding)||5,pointLabelFontSize:(null==(u=x.quadrantChart)?void 0:u.pointLabelFontSize)||12,pointRadius:(null==(g=x.quadrantChart)?void 0:g.pointRadius)||5,xAxisPosition:(null==(f=x.quadrantChart)?void 0:f.xAxisPosition)||"top",yAxisPosition:(null==(p=x.quadrantChart)?void 0:p.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:(null==(y=x.quadrantChart)?void 0:y.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:(null==(T=x.quadrantChart)?void 0:T.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:q.quadrant1Fill,quadrant2Fill:q.quadrant2Fill,quadrant3Fill:q.quadrant3Fill,quadrant4Fill:q.quadrant4Fill,quadrant1TextFill:q.quadrant1TextFill,quadrant2TextFill:q.quadrant2TextFill,quadrant3TextFill:q.quadrant3TextFill,quadrant4TextFill:q.quadrant4TextFill,quadrantPointFill:q.quadrantPointFill,quadrantPointTextFill:q.quadrantPointTextFill,quadrantXAxisTextFill:q.quadrantXAxisTextFill,quadrantYAxisTextFill:q.quadrantYAxisTextFill,quadrantTitleFill:q.quadrantTitleFill,quadrantInternalBorderStrokeFill:q.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:q.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,c.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){c.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){c.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,i,a){const n=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,s={top:"top"===t&&e?n:0,bottom:"bottom"===t&&e?n:0},r=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,o={left:"left"===this.config.yAxisPosition&&i?r:0,right:"right"===this.config.yAxisPosition&&i?r:0},l=this.config.titleFontSize+2*this.config.titlePadding,h={top:a?l:0},c=this.config.quadrantPadding+o.left,d=this.config.quadrantPadding+s.top+h.top,u=this.config.chartWidth-2*this.config.quadrantPadding-o.left-o.right,x=this.config.chartHeight-2*this.config.quadrantPadding-s.top-s.bottom-h.top;return{xAxisSpace:s,yAxisSpace:o,titleSpace:h,quadrantSpace:{quadrantLeft:c,quadrantTop:d,quadrantWidth:u,quadrantHalfWidth:u/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,e,i,a){const{quadrantSpace:n,titleSpace:s}=a,{quadrantHalfHeight:r,quadrantHeight:o,quadrantLeft:l,quadrantHalfWidth:h,quadrantTop:c,quadrantWidth:d}=n,u=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),g=[];return this.data.xAxisLeftText&&e&&g.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&g.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+h+(u?h/2:0),y:"top"===t?this.config.xAxisLabelPadding+s.top:this.config.xAxisLabelPadding+c+o+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&i&&g.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+o-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&i&&g.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+d+this.config.quadrantPadding,y:c+r-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),g}getQuadrants(t){const{quadrantSpace:e}=t,{quadrantHalfHeight:i,quadrantLeft:a,quadrantHalfWidth:n,quadrantTop:s}=e,r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s,width:n,height:i,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s,width:n,height:i,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:a+n,y:s+i,width:n,height:i,fill:this.themeConfig.quadrant4Fill}];for(const o of r)o.text.x=o.x+o.width/2,0===this.data.points.length?(o.text.y=o.y+o.height/2,o.text.horizontalPos="middle"):(o.text.y=o.y+this.config.quadrantTextTopPadding,o.text.horizontalPos="top");return r}getQuadrantPoints(t){const{quadrantSpace:e}=t,{quadrantHeight:i,quadrantLeft:a,quadrantTop:n,quadrantWidth:s}=e,r=y().domain([0,1]).range([a,s+a]),o=y().domain([0,1]).range([i+n,n]);return this.data.points.map((t=>{const e=this.classes.get(t.className);e&&(t={...e,...t});return{x:r(t.x),y:o(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:r(t.x),y:o(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}}))}getBorders(t){const e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:i}=t,{quadrantHalfHeight:a,quadrantHeight:n,quadrantLeft:s,quadrantHalfWidth:r,quadrantTop:o,quadrantWidth:l}=i;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o,x2:s+l+e,y2:o},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s+l,y1:o+e,x2:s+l,y2:o+n-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s-e,y1:o+n,x2:s+l+e,y2:o+n},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:s,y1:o+e,x2:s,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+r,y1:o+e,x2:s+r,y2:o+n-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:s+e,y1:o+a,x2:s+l-e,y2:o+a}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),i=this.config.showTitle&&!!this.data.titleText,a=this.data.points.length>0?"bottom":this.config.xAxisPosition,n=this.calculateSpace(a,t,e,i);return{points:this.getQuadrantPoints(n),quadrants:this.getQuadrants(n),axisLabels:this.getAxisLabels(a,t,e,n),borderLines:this.getBorders(n),title:this.getTitle(i)}}},"QuadrantBuilder"),t),_=(e=class extends Error{constructor(t,e,i){super(`value for ${t} ${e} is invalid, please use a valid ${i}`),this.name="InvalidStyleError"}},i(e,"InvalidStyleError"),e);function b(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function S(t){return!/^\d+$/.test(t)}function k(t){return!/^\d+px$/.test(t)}i(b,"validateHexCode"),i(S,"validateNumber"),i(k,"validateSizeInPixels");var F=h();function P(t){return f(t.trim(),F)}i(P,"textSanitizer");var v=new A;function C(t){v.setData({quadrant1Text:P(t.text)})}function L(t){v.setData({quadrant2Text:P(t.text)})}function E(t){v.setData({quadrant3Text:P(t.text)})}function D(t){v.setData({quadrant4Text:P(t.text)})}function z(t){v.setData({xAxisLeftText:P(t.text)})}function I(t){v.setData({xAxisRightText:P(t.text)})}function w(t){v.setData({yAxisTopText:P(t.text)})}function N(t){v.setData({yAxisBottomText:P(t.text)})}function W(t){const e={};for(const i of t){const[t,a]=i.trim().split(/\s*:\s*/);if("radius"===t){if(S(a))throw new _(t,a,"number");e.radius=parseInt(a)}else if("color"===t){if(b(a))throw new _(t,a,"hex code");e.color=a}else if("stroke-color"===t){if(b(a))throw new _(t,a,"hex code");e.strokeColor=a}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(k(a))throw new _(t,a,"number of pixels (eg. 10px)");e.strokeWidth=a}}return e}function B(t,e,i,a,n){const s=W(n);v.addPoints([{x:i,y:a,text:P(t.text),className:e,...s}])}function R(t,e){v.addClass(t,W(e))}function $(t){v.setConfig({chartWidth:t})}function U(t){v.setConfig({chartHeight:t})}function Q(){const t=h(),{themeVariables:e,quadrantChart:i}=t;return i&&v.setConfig(i),v.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),v.setData({titleText:s()}),v.build()}i(C,"setQuadrant1Text"),i(L,"setQuadrant2Text"),i(E,"setQuadrant3Text"),i(D,"setQuadrant4Text"),i(z,"setXAxisLeftText"),i(I,"setXAxisRightText"),i(w,"setYAxisTopText"),i(N,"setYAxisBottomText"),i(W,"parseStyles"),i(B,"addPoint"),i(R,"addClass"),i($,"setWidth"),i(U,"setHeight"),i(Q,"getQuadrantData");var O={parser:m,db:{setWidth:$,setHeight:U,setQuadrant1Text:C,setQuadrant2Text:L,setQuadrant3Text:E,setQuadrant4Text:D,setXAxisLeftText:z,setXAxisRightText:I,setYAxisTopText:w,setYAxisBottomText:N,parseStyles:W,addPoint:B,addClass:R,getQuadrantData:Q,clear:i((function(){v.clear(),u()}),"clear"),setAccTitle:l,getAccTitle:o,setDiagramTitle:r,getDiagramTitle:s,getAccDescription:n,setAccDescription:a},renderer:{draw:i(((t,e,a,n)=>{var s,r,o;function l(t){return"top"===t?"hanging":"middle"}function u(t){return"left"===t?"start":"middle"}function x(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}i(l,"getDominantBaseLine"),i(u,"getTextAnchor"),i(x,"getTransformation");const g=h();c.debug("Rendering quadrant chart\n"+t);const f=g.securityLevel;let y;"sandbox"===f&&(y=p("#i"+e));const T=p("sandbox"===f?y.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`),m=T.append("g").attr("class","main"),q=(null==(s=g.quadrantChart)?void 0:s.chartWidth)??500,A=(null==(r=g.quadrantChart)?void 0:r.chartHeight)??500;d(T,A,q,(null==(o=g.quadrantChart)?void 0:o.useMaxWidth)??!0),T.attr("viewBox","0 0 "+q+" "+A),n.db.setHeight(A),n.db.setWidth(q);const _=n.db.getQuadrantData(),b=m.append("g").attr("class","quadrants"),S=m.append("g").attr("class","border"),k=m.append("g").attr("class","data-points"),F=m.append("g").attr("class","labels"),P=m.append("g").attr("class","title");_.title&&P.append("text").attr("x",0).attr("y",0).attr("fill",_.title.fill).attr("font-size",_.title.fontSize).attr("dominant-baseline",l(_.title.horizontalPos)).attr("text-anchor",u(_.title.verticalPos)).attr("transform",x(_.title)).text(_.title.text),_.borderLines&&S.selectAll("line").data(_.borderLines).enter().append("line").attr("x1",(t=>t.x1)).attr("y1",(t=>t.y1)).attr("x2",(t=>t.x2)).attr("y2",(t=>t.y2)).style("stroke",(t=>t.strokeFill)).style("stroke-width",(t=>t.strokeWidth));const v=b.selectAll("g.quadrant").data(_.quadrants).enter().append("g").attr("class","quadrant");v.append("rect").attr("x",(t=>t.x)).attr("y",(t=>t.y)).attr("width",(t=>t.width)).attr("height",(t=>t.height)).attr("fill",(t=>t.fill)),v.append("text").attr("x",0).attr("y",0).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>l(t.text.horizontalPos))).attr("text-anchor",(t=>u(t.text.verticalPos))).attr("transform",(t=>x(t.text))).text((t=>t.text.text));F.selectAll("g.label").data(_.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text((t=>t.text)).attr("fill",(t=>t.fill)).attr("font-size",(t=>t.fontSize)).attr("dominant-baseline",(t=>l(t.horizontalPos))).attr("text-anchor",(t=>u(t.verticalPos))).attr("transform",(t=>x(t)));const C=k.selectAll("g.data-point").data(_.points).enter().append("g").attr("class","data-point");C.append("circle").attr("cx",(t=>t.x)).attr("cy",(t=>t.y)).attr("r",(t=>t.radius)).attr("fill",(t=>t.fill)).attr("stroke",(t=>t.strokeColor)).attr("stroke-width",(t=>t.strokeWidth)),C.append("text").attr("x",0).attr("y",0).text((t=>t.text.text)).attr("fill",(t=>t.text.fill)).attr("font-size",(t=>t.text.fontSize)).attr("dominant-baseline",(t=>l(t.text.horizontalPos))).attr("text-anchor",(t=>u(t.text.verticalPos))).attr("transform",(t=>x(t.text)))}),"draw")},styles:i((()=>""),"styles")};export{O as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e;import{g as t,s}from"./chunk-RZ5BOZE2-Djj4U8sI.js";import{_ as i,b as n,a as r,s as a,g as l,p as c,q as o,c as h,l as u,y,B as m,o as E,r as p,u as d}from"./mermaid-iAIjIGjg.js";import"./transform-CdY8z5kT.js";import"./step-xJWGRC3d.js";import"./index-QV1pM6V_.js";var R=function(){var e=i((function(e,t,s,i){for(s=s||{},i=e.length;i--;s[e[i]]=t);return s}),"o"),t=[1,3],s=[1,4],n=[1,5],r=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],l=[1,22],c=[2,7],o=[1,26],h=[1,27],u=[1,28],y=[1,29],m=[1,33],E=[1,34],p=[1,35],d=[1,36],R=[1,37],f=[1,38],_=[1,24],g=[1,31],S=[1,32],I=[1,30],b=[1,39],T=[1,40],k=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],N=[1,61],q=[89,90],C=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],A=[27,29],v=[1,70],L=[1,71],O=[1,72],x=[1,73],w=[1,74],D=[1,75],M=[1,76],$=[1,83],F=[1,80],P=[1,84],U=[1,85],V=[1,86],Y=[1,87],B=[1,88],Q=[1,89],H=[1,90],K=[1,91],j=[1,92],W=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],G=[63,64],z=[1,101],X=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],Z=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],J=[1,110],ee=[1,106],te=[1,107],se=[1,108],ie=[1,109],ne=[1,111],re=[1,116],ae=[1,117],le=[1,114],ce=[1,115],oe={trace:i((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:i((function(e,t,s,i,n,r,a){var l=r.length-1;switch(n){case 4:this.$=r[l].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=r[l].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(r[l-3],r[l-4]);break;case 22:i.addRequirement(r[l-5],r[l-6]),i.setClass([r[l-5]],r[l-3]);break;case 23:i.setNewReqId(r[l-2]);break;case 24:i.setNewReqText(r[l-2]);break;case 25:i.setNewReqRisk(r[l-2]);break;case 26:i.setNewReqVerifyMethod(r[l-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(r[l-3]);break;case 43:i.addElement(r[l-5]),i.setClass([r[l-5]],r[l-3]);break;case 44:i.setNewElementType(r[l-2]);break;case 45:i.setNewElementDocRef(r[l-2]);break;case 48:i.addRelationship(r[l-2],r[l],r[l-4]);break;case 49:i.addRelationship(r[l-2],r[l-4],r[l]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=r[l-2],i.defineClass(r[l-1],r[l]);break;case 58:i.setClass(r[l-1],r[l]);break;case 59:i.setClass([r[l-2]],r[l]);break;case 60:case 62:case 65:this.$=[r[l]];break;case 61:case 63:this.$=r[l-2].concat([r[l]]);break;case 64:this.$=r[l-2],i.setCssStyle(r[l-1],r[l]);break;case 66:r[l-2].push(r[l]),this.$=r[l-2];break;case 68:this.$=r[l-1]+r[l]}}),"anonymous"),table:[{3:1,4:2,6:t,9:s,11:n,13:r},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:s,11:n,13:r},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:t,9:s,11:n,13:r},{1:[2,2]},{4:17,5:l,7:13,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:l,7:42,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:43,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:44,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:45,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:46,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:47,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:48,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:49,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{4:17,5:l,7:50,8:c,9:s,11:n,13:r,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:h,23:u,24:y,25:23,33:25,41:m,42:E,43:p,44:d,45:R,46:f,54:_,72:g,74:S,77:I,89:b,90:T},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(k,[2,17]),e(k,[2,18]),e(k,[2,19]),e(k,[2,20]),{30:60,33:62,75:N,89:b,90:T},{30:63,33:62,75:N,89:b,90:T},{30:64,33:62,75:N,89:b,90:T},e(q,[2,29]),e(q,[2,30]),e(q,[2,31]),e(q,[2,32]),e(q,[2,33]),e(q,[2,34]),e(C,[2,81]),e(C,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(A,[2,79]),e(A,[2,80]),{27:[1,67],29:[1,68]},e(A,[2,85]),e(A,[2,86]),{62:69,65:v,66:L,67:O,68:x,69:w,70:D,71:M},{62:77,65:v,66:L,67:O,68:x,69:w,70:D,71:M},{30:78,33:62,75:N,89:b,90:T},{73:79,75:$,76:F,78:81,79:82,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:K,88:j},e(W,[2,60]),e(W,[2,62]),{73:93,75:$,76:F,78:81,79:82,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:K,88:j},{30:94,33:62,75:N,76:F,89:b,90:T},{5:[1,95]},{30:96,33:62,75:N,89:b,90:T},{5:[1,97]},{30:98,33:62,75:N,89:b,90:T},{63:[1,99]},e(G,[2,50]),e(G,[2,51]),e(G,[2,52]),e(G,[2,53]),e(G,[2,54]),e(G,[2,55]),e(G,[2,56]),{64:[1,100]},e(k,[2,59],{76:F}),e(k,[2,64],{76:z}),{33:103,75:[1,102],89:b,90:T},e(X,[2,65],{79:104,75:$,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:K,88:j}),e(Z,[2,67]),e(Z,[2,69]),e(Z,[2,70]),e(Z,[2,71]),e(Z,[2,72]),e(Z,[2,73]),e(Z,[2,74]),e(Z,[2,75]),e(Z,[2,76]),e(Z,[2,77]),e(Z,[2,78]),e(k,[2,57],{76:z}),e(k,[2,58],{76:F}),{5:J,28:105,31:ee,34:te,36:se,38:ie,40:ne},{27:[1,112],76:F},{5:re,40:ae,56:113,57:le,59:ce},{27:[1,118],76:F},{33:119,89:b,90:T},{33:120,89:b,90:T},{75:$,78:121,79:82,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:K,88:j},e(W,[2,61]),e(W,[2,63]),e(Z,[2,68]),e(k,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:J,28:126,31:ee,34:te,36:se,38:ie,40:ne},e(k,[2,28]),{5:[1,127]},e(k,[2,42]),{32:[1,128]},{32:[1,129]},{5:re,40:ae,56:130,57:le,59:ce},e(k,[2,47]),{5:[1,131]},e(k,[2,48]),e(k,[2,49]),e(X,[2,66],{79:104,75:$,80:P,81:U,82:V,83:Y,84:B,85:Q,86:H,87:K,88:j}),{33:132,89:b,90:T},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(k,[2,27]),{5:J,28:145,31:ee,34:te,36:se,38:ie,40:ne},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(k,[2,46]),{5:re,40:ae,56:152,57:le,59:ce},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(k,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(k,[2,43]),{5:J,28:159,31:ee,34:te,36:se,38:ie,40:ne},{5:J,28:160,31:ee,34:te,36:se,38:ie,40:ne},{5:J,28:161,31:ee,34:te,36:se,38:ie,40:ne},{5:J,28:162,31:ee,34:te,36:se,38:ie,40:ne},{5:re,40:ae,56:163,57:le,59:ce},{5:re,40:ae,56:164,57:le,59:ce},e(k,[2,23]),e(k,[2,24]),e(k,[2,25]),e(k,[2,26]),e(k,[2,44]),e(k,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:i((function(e,t){if(!t.recoverable){var s=new Error(e);throw s.hash=t,s}this.trace(e)}),"parseError"),parse:i((function(e){var t=this,s=[0],n=[],r=[null],a=[],l=this.table,c="",o=0,h=0,u=a.slice.call(arguments,1),y=Object.create(this.lexer),m={yy:{}};for(var E in this.yy)Object.prototype.hasOwnProperty.call(this.yy,E)&&(m.yy[E]=this.yy[E]);y.setInput(e,m.yy),m.yy.lexer=y,m.yy.parser=this,void 0===y.yylloc&&(y.yylloc={});var p=y.yylloc;a.push(p);var d=y.options&&y.options.ranges;function R(){var e;return"number"!=typeof(e=n.pop()||y.lex()||1)&&(e instanceof Array&&(e=(n=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof m.yy.parseError?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i((function(e){s.length=s.length-2*e,r.length=r.length-e,a.length=a.length-e}),"popStack"),i(R,"lex");for(var f,_,g,S,I,b,T,k,N={};;){if(_=s[s.length-1],this.defaultActions[_]?g=this.defaultActions[_]:(null==f&&(f=R()),g=l[_]&&l[_][f]),void 0===g||!g.length||!g[0]){var q="";for(I in k=[],l[_])this.terminals_[I]&&I>2&&k.push("'"+this.terminals_[I]+"'");q=y.showPosition?"Parse error on line "+(o+1)+":\n"+y.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(q,{text:y.match,token:this.terminals_[f]||f,line:y.yylineno,loc:p,expected:k})}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+f);switch(g[0]){case 1:s.push(f),r.push(y.yytext),a.push(y.yylloc),s.push(g[1]),f=null,h=y.yyleng,c=y.yytext,o=y.yylineno,p=y.yylloc;break;case 2:if(b=this.productions_[g[1]][1],N.$=r[r.length-b],N._$={first_line:a[a.length-(b||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(b||1)].first_column,last_column:a[a.length-1].last_column},d&&(N._$.range=[a[a.length-(b||1)].range[0],a[a.length-1].range[1]]),void 0!==(S=this.performAction.apply(N,[c,h,o,m.yy,g[1],r,a].concat(u))))return S;b&&(s=s.slice(0,-1*b*2),r=r.slice(0,-1*b),a=a.slice(0,-1*b)),s.push(this.productions_[g[1]][0]),r.push(N.$),a.push(N._$),T=l[s[s.length-2]][s[s.length-1]],s.push(T);break;case 3:return!0}}return!0}),"parse")},he=function(){return{EOF:1,parseError:i((function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)}),"parseError"),setInput:i((function(e,t){return this.yy=t||this.yy||{},this._input=e,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:i((function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.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),e}),"input"),unput:i((function(e){var t=e.length,s=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=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 n=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===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this}),"unput"),more:i((function(){return this._more=!0,this}),"more"),reject:i((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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:i((function(e){this.unput(this.match.slice(e))}),"less"),pastInput:i((function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:i((function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:i((function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"}),"showPosition"),test_match:i((function(e,t){var s,i,n;if(this.options.backtrack_lexer&&(n={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&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,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(e[0].length),this.matched+=e[0],s=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1}),"test_match"),next:i((function(){if(this.done)return this.EOF;var e,t,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!t||s[0].length>t[0].length)){if(t=s,i=r,this.options.backtrack_lexer){if(!1!==(e=this.test_match(s,n[r])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,n[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:i((function(){var e=this.next();return e||this.lex()}),"lex"),begin:i((function(e){this.conditionStack.push(e)}),"begin"),popState:i((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:i((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:i((function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"}),"topState"),pushState:i((function(e){this.begin(e)}),"pushState"),stateStackSize:i((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:i((function(e,t,s,i){switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 58:case 65:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:case 56:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:case 68:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 57:case 64:this.begin("string");break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 66:return"qString";case 67:return t.yytext=t.yytext.trim(),89;case 69:return 80;case 70:return 76}}),"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}}();function ue(){this.yy={}}return oe.lexer=he,i(ue,"Parser"),ue.prototype=oe,oe.Parser=ue,new ue}();R.parser=R;var f=R,_=(i(e=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction="TB",this.RequirementType={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},this.RiskLevel={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},this.VerifyType={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},this.Relationships={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},this.setAccTitle=n,this.getAccTitle=r,this.setAccDescription=a,this.getAccDescription=l,this.setDiagramTitle=c,this.getDiagramTitle=o,this.getConfig=i((()=>h().requirement),"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:"",text:"",risk:"",verifyMethod:"",name:"",type:"",cssStyles:[],classes:["default"]}}getInitialElement(){return{name:"",type:"",docRef:"",cssStyles:[],classes:["default"]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=e)}setNewReqText(e){void 0!==this.latestRequirement&&(this.latestRequirement.text=e)}setNewReqRisk(e){void 0!==this.latestRequirement&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),u.info("Added new element: ",e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){void 0!==this.latestElement&&(this.latestElement.type=e)}setNewElementDocRef(e){void 0!==this.latestElement&&(this.latestElement.docRef=e)}addRelationship(e,t,s){this.relations.push({type:e,src:t,dst:s})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,y()}setCssStyle(e,t){for(const s of e){const e=this.requirements.get(s)??this.elements.get(s);if(!t||!e)return;for(const s of t)s.includes(",")?e.cssStyles.push(...s.split(",")):e.cssStyles.push(s)}}setClass(e,t){var s;for(const i of e){const e=this.requirements.get(i)??this.elements.get(i);if(e)for(const i of t){e.classes.push(i);const t=null==(s=this.classes.get(i))?void 0:s.styles;t&&e.cssStyles.push(...t)}}}defineClass(e,t){for(const s of e){let e=this.classes.get(s);void 0===e&&(e={id:s,styles:[],textStyles:[]},this.classes.set(s,e)),t&&t.forEach((function(t){if(/color/.exec(t)){const s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)})),this.requirements.forEach((e=>{e.classes.includes(s)&&e.cssStyles.push(...t.flatMap((e=>e.split(","))))})),this.elements.forEach((e=>{e.classes.includes(s)&&e.cssStyles.push(...t.flatMap((e=>e.split(","))))}))}}getClasses(){return this.classes}getData(){var e,t,s,i;const n=h(),r=[],a=[];for(const l of this.requirements.values()){const e=l;e.id=l.name,e.cssStyles=l.cssStyles,e.cssClasses=l.classes.join(" "),e.shape="requirementBox",e.look=n.look,r.push(e)}for(const l of this.elements.values()){const e=l;e.shape="requirementBox",e.look=n.look,e.id=l.name,e.cssStyles=l.cssStyles,e.cssClasses=l.classes.join(" "),r.push(e)}for(const l of this.relations){let r=0;const c=l.type===this.Relationships.CONTAINS,o={id:`${l.src}-${l.dst}-${r}`,start:(null==(e=this.requirements.get(l.src))?void 0:e.name)??(null==(t=this.elements.get(l.src))?void 0:t.name),end:(null==(s=this.requirements.get(l.dst))?void 0:s.name)??(null==(i=this.elements.get(l.dst))?void 0:i.name),label:`<<${l.type}>>`,classes:"relationshipLine",style:["fill:none",c?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:c?"normal":"dashed",arrowTypeStart:c?"requirement_contains":"",arrowTypeEnd:c?"":"requirement_arrow",look:n.look};a.push(o),r++}return{nodes:r,edges:a,other:{},config:n,direction:this.getDirection()}}},"RequirementDB"),e),g=i((e=>`\n\n marker {\n fill: ${e.relationColor};\n stroke: ${e.relationColor};\n }\n\n marker.cross {\n stroke: ${e.lineColor};\n }\n\n svg {\n font-family: ${e.fontFamily};\n font-size: ${e.fontSize};\n }\n\n .reqBox {\n fill: ${e.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${e.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${e.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${e.requirementBorderColor};\n stroke-width: ${e.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${e.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${e.relationLabelColor};\n }\n .divider {\n stroke: ${e.nodeBorder};\n stroke-width: 1;\n }\n .label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .label text,span {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n .labelBkg {\n background-color: ${e.edgeLabelBackground};\n }\n\n`),"getStyles"),S={};m(S,{draw:()=>I});var I=i((async function(e,i,n,r){u.info("REF0:"),u.info("Drawing requirement diagram (unified)",i);const{securityLevel:a,state:l,layout:c}=h(),o=r.db.getData(),y=t(i,a);o.type=r.type,o.layoutAlgorithm=E(c),o.nodeSpacing=(null==l?void 0:l.nodeSpacing)??50,o.rankSpacing=(null==l?void 0:l.rankSpacing)??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=i,await p(o,y);d.insertTitle(y,"requirementDiagramTitleText",(null==l?void 0:l.titleTopMargin)??25,r.db.getDiagramTitle()),s(y,8,"requirementDiagram",(null==l?void 0:l.useMaxWidth)??!0)}),"draw"),b={parser:f,get db(){return new _},renderer:S,styles:g};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P as e,Q as a,S as s,T as t,U as o,V as n,W as r,X as i,Y as l,Z as c,_ as m,$ as d,a0 as h,a1 as b,a2 as x,a3 as f,a4 as y,a5 as p,a6 as u,a7 as g,a8 as _,a9 as j,aa as k,ab as v,ac as w,ad as S}from"./index-QV1pM6V_.js";import{u as N,A as C,R as I,a as P,C as T}from"./useMarimoWebSocket-c24mYV70.js";const A=r=>{const l=e.c(14),{appConfig:c}=r,{setCells:m}=a();let d,h,b;l[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],l[0]=d):d=l[0],s.useEffect(E,d),l[1]===Symbol.for("react.memo_cache_sentinel")?(h=i(),l[1]=h):h=l[1],l[2]!==m?(b={autoInstantiate:!0,setCells:m,sessionId:h},l[2]=m,l[3]=b):b=l[3];const{connection:x}=N(b),f=t(o);let y,p,u;return l[4]!==x?(y=n.jsx(P,{connection:x,className:"sm:pt-8"}),l[4]=x,l[5]=y):y=l[5],l[6]!==c?(p=n.jsx(T,{appConfig:c,mode:"read"}),l[6]=c,l[7]=p):p=l[7],l[8]!==c.width||l[9]!==x||l[10]!==f||l[11]!==y||l[12]!==p?(u=n.jsxs(C,{connection:x,isRunning:f,width:c.width,children:[y,p]}),l[8]=c.width,l[9]=x,l[10]=f,l[11]=y,l[12]=p,l[13]=u):u=l[13],u};function W(){I.INSTANCE.stop()}function E(){return I.INSTANCE.start(r),W}const R=()=>{const a=e.c(4);if(!l())return null;let s;a[0]===Symbol.for("react.memo_cache_sentinel")?(s=c(),a[0]=s):s=a[0];const t=s;if(!t)return null;let o,r,i;return a[1]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx("a",{href:m.githubPage,target:"_blank",className:"underline",children:"marimo"}),a[1]=o):o=a[1],a[2]===Symbol.for("react.memo_cache_sentinel")?(r=n.jsxs("span",{children:["This is a static Python notebook built using"," ",o,".",n.jsx("br",{}),"Some interactive features may not work, see ways to run or edit this."]}),a[2]=r):r=a[2],a[3]===Symbol.for("react.memo_cache_sentinel")?(i=n.jsxs("div",{className:"px-4 py-2 bg-[var(--sky-2)] border-b border-[var(--sky-7)] text-md text-[var(--sky-11)] font-semibold flex justify-between items-center gap-4 no-print",children:[r,n.jsx("span",{className:"flex-shrink-0",children:n.jsx(D,{code:t})})]}),a[3]=i):i=a[3],i},D=a=>{const s=e.c(81),{code:t}=a;let o;if(s[0]===Symbol.for("react.memo_cache_sentinel")){o=d()||"notebook.py";const e=o.lastIndexOf("/");-1!==e&&(o=o.slice(e+1)),s[0]=o}else o=s[0];const r=window.location.href;let i,l,c,S,N,C,I,P,T,A,W,E,R,D,F,Y,z,B,M,O,Q,U,V,X,Z,$,q,G,H,J,K,L,ee,ae,se,te,oe;if(s[1]!==t){const e=h({code:t});let a;S=b,s[25]===Symbol.for("react.memo_cache_sentinel")?(F=n.jsx(x,{asChild:!0,children:n.jsx(f,{"data-testid":"static-notebook-dialog-trigger",variant:"secondary",children:"Run or edit this notebook"})}),s[25]=F):F=s[25],c=y,l=p,s[26]===Symbol.for("react.memo_cache_sentinel")?(D=n.jsx(u,{children:o}),s[26]=D):D=s[26],i=g,O="pt-4 text-md text-left",Q="This is a static notebook built using",U=" ",s[27]===Symbol.for("react.memo_cache_sentinel")?(V=n.jsx("a",{href:m.githubPage,target:"_blank",className:"text-link hover:underline",children:"marimo"}),s[27]=V):V=s[27],C=". marimo is an open-source next-generation Python notebook.",s[28]===Symbol.for("react.memo_cache_sentinel")?(I=n.jsx("hr",{className:"my-3"}),s[28]=I):I=s[28],P="In order to edit this notebook, you will need to download the code locally, install marimo, and run the following in your terminal:",s[29]===Symbol.for("react.memo_cache_sentinel")?(a=n.jsx("br",{}),s[29]=a):a=s[29],s[30]===Symbol.for("react.memo_cache_sentinel")?(T=n.jsxs("div",{className:"font-mono text-sm bg-[var(--sky-2)] rounded-md my-3 p-2 border border-[var(--sky-7)]",children:["pip install marimo",a,"marimo edit ",o]}),A=!r.endsWith(".html")&&n.jsxs(n.Fragment,{children:["or",n.jsxs("div",{className:"font-mono text-sm bg-[var(--sky-2)] rounded-md my-3 p-2 border border-[var(--sky-7)] break-all",children:["marimo edit ",window.location.href]})]}),W=n.jsx("hr",{className:"my-3"}),s[30]=T,s[31]=A,s[32]=W):(T=s[30],A=s[31],W=s[32]),E="You may also be able to run this notebook entirely in the browser via WebAssembly at:",R=" ",N=e,Y="_blank",z="text-link hover:underline",B="noreferrer",M=e.slice(0,40),s[1]=t,s[2]=i,s[3]=l,s[4]=c,s[5]=S,s[6]=N,s[7]=C,s[8]=I,s[9]=P,s[10]=T,s[11]=A,s[12]=W,s[13]=E,s[14]=R,s[15]=D,s[16]=F,s[17]=Y,s[18]=z,s[19]=B,s[20]=M,s[21]=O,s[22]=Q,s[23]=U,s[24]=V}else i=s[2],l=s[3],c=s[4],S=s[5],N=s[6],C=s[7],I=s[8],P=s[9],T=s[10],A=s[11],W=s[12],E=s[13],R=s[14],D=s[15],F=s[16],Y=s[17],z=s[18],B=s[19],M=s[20],O=s[21],Q=s[22],U=s[23],V=s[24];return s[33]!==N||s[34]!==Y||s[35]!==z||s[36]!==B||s[37]!==M?(X=n.jsxs("a",{href:N,target:Y,className:z,rel:B,children:[M,"..."]}),s[33]=N,s[34]=Y,s[35]=z,s[36]=B,s[37]=M,s[38]=X):X=s[38],s[39]===Symbol.for("react.memo_cache_sentinel")?(Z=n.jsx("br",{}),s[39]=Z):Z=s[39],s[40]===Symbol.for("react.memo_cache_sentinel")?($=n.jsxs("div",{className:"text-sm text-muted-foreground pt-2",children:[n.jsx("strong",{children:"Note:"})," This feature is experimental and may not work for all notebooks. Additionally, some dependencies may not be available in the browser."]}),s[40]=$):$=s[40],s[41]!==i||s[42]!==C||s[43]!==I||s[44]!==P||s[45]!==T||s[46]!==A||s[47]!==W||s[48]!==E||s[49]!==R||s[50]!==X||s[51]!==O||s[52]!==Q||s[53]!==U||s[54]!==V?(q=n.jsxs(i,{className:O,children:[Q,U,V,C,I,P,T,A,W,E,R,X,Z,$]}),s[41]=i,s[42]=C,s[43]=I,s[44]=P,s[45]=T,s[46]=A,s[47]=W,s[48]=E,s[49]=R,s[50]=X,s[51]=O,s[52]=Q,s[53]=U,s[54]=V,s[55]=q):q=s[55],s[56]!==l||s[57]!==D||s[58]!==q?(G=n.jsxs(l,{children:[D,q]}),s[56]=l,s[57]=D,s[58]=q,s[59]=G):G=s[59],s[60]!==t?(H=async()=>{await _(t),j({title:"Copied to clipboard"})},s[60]=t,s[61]=H):H=s[61],s[62]===Symbol.for("react.memo_cache_sentinel")?(J=n.jsx(k,{className:"w-4 h-4 mr-1"}),s[62]=J):J=s[62],s[63]!==H?(K=n.jsxs(f,{"data-testid":"copy-static-notebook-dialog-button",variant:"secondary",onClick:H,children:[J,"Copy code"]}),s[63]=H,s[64]=K):K=s[64],s[65]!==t?(L=()=>{v(new Blob([t],{type:"text/plain"}),o)},s[65]=t,s[66]=L):L=s[66],s[67]===Symbol.for("react.memo_cache_sentinel")?(ee=n.jsx(w,{className:"w-4 h-4 mr-1"}),s[67]=ee):ee=s[67],s[68]!==L?(ae=n.jsxs(f,{"data-testid":"download-static-notebook-dialog-button",variant:"secondary",onClick:L,children:[ee,"Download code"]}),s[68]=L,s[69]=ae):ae=s[69],s[70]!==K||s[71]!==ae?(se=n.jsxs("div",{className:"flex gap-4 flex-wrap",children:[K,ae]}),s[70]=K,s[71]=ae,s[72]=se):se=s[72],s[73]!==c||s[74]!==G||s[75]!==se?(te=n.jsxs(c,{children:[G,se]}),s[73]=c,s[74]=G,s[75]=se,s[76]=te):te=s[76],s[77]!==S||s[78]!==F||s[79]!==te?(oe=n.jsxs(S,{children:[F,te]}),s[77]=S,s[78]=F,s[79]=te,s[80]=oe):oe=s[80],oe},F=S()||l(),Y=a=>{const s=e.c(6);let t,o,r,i;return s[0]===Symbol.for("react.memo_cache_sentinel")?(t=n.jsx(R,{}),s[0]=t):t=s[0],s[1]!==a.appConfig?(o=n.jsx(A,{appConfig:a.appConfig}),s[1]=a.appConfig,s[2]=o):o=s[2],s[3]===Symbol.for("react.memo_cache_sentinel")?(r=F&&n.jsx(z,{}),s[3]=r):r=s[3],s[4]!==o?(i=n.jsxs(n.Fragment,{children:[t,o,r]}),s[4]=o,s[5]=i):i=s[5],i},z=()=>{const a=e.c(1);let s;return a[0]===Symbol.for("react.memo_cache_sentinel")?(s=n.jsx("div",{className:"fixed bottom-0 right-0 z-50",children:n.jsxs("a",{href:m.githubPage,target:"_blank",className:"text-sm text-[var(--grass-11)] font-bold tracking-wide transition-colors bg-[var(--grass-4)] hover:bg-[var(--grass-5)] border-t border-l border-[var(--grass-8)] px-3 py-1 rounded-tl-md flex items-center gap-2",children:[n.jsx("span",{className:"pb-[2px]",children:"made with marimo"}),n.jsx("img",{src:"./favicon.ico",alt:"marimo",className:"h-4 w-auto"})]})}),a[0]=s):s=a[0],s};export{Y as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var t,n,e;import{_ as i,p as r,q as s,s as o,g as l,b as a,a as c,c as h,z as u,S as f,y,j as d}from"./mermaid-iAIjIGjg.js";import{s as p}from"./transform-CdY8z5kT.js";import{o as g}from"./ordinal-DDUp3AbE.js";import{c as _}from"./colors-bszWmPJw.js";import"./index-QV1pM6V_.js";import"./step-xJWGRC3d.js";import"./init-DLRA0X12.js";const m=_("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function x(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var k,v;function b(t,n){var e,i,r=t.length,s=-1;if(null==n){for(;++s<r;)if(null!=(e=t[s])&&e>=e)for(i=e;++s<r;)null!=(e=t[s])&&e>i&&(i=e)}else for(;++s<r;)if(null!=(e=n(t[s],s,t))&&e>=e)for(i=e;++s<r;)null!=(e=n(t[s],s,t))&&e>i&&(i=e);return i}function w(t,n){var e,i,r=t.length,s=-1;if(null==n){for(;++s<r;)if(null!=(e=t[s])&&e>=e)for(i=e;++s<r;)null!=(e=t[s])&&i>e&&(i=e)}else for(;++s<r;)if(null!=(e=n(t[s],s,t))&&e>=e)for(i=e;++s<r;)null!=(e=n(t[s],s,t))&&i>e&&(i=e);return i}function S(t,n){var e,i=t.length,r=-1,s=0;if(null==n)for(;++r<i;)(e=+t[r])&&(s+=e);else for(;++r<i;)(e=+n(t[r],r,t))&&(s+=e);return s}function E(t){return t.target.depth}function L(t,n){return t.sourceLinks.length?t.depth:n-1}function A(t){return function(){return t}}function M(t,n){return T(t.source,n.source)||t.index-n.index}function I(t,n){return T(t.target,n.target)||t.index-n.index}function T(t,n){return t.y0-n.y0}function N(t){return t.value}function j(t){return t.index}function P(t){return t.nodes}function O(t){return t.links}function C(t,n){const e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function D({nodes:t}){for(const n of t){let t=n.y0,e=t;for(const i of n.sourceLinks)i.y0=t+i.width/2,t+=i.width;for(const i of n.targetLinks)i.y1=e+i.width/2,e+=i.width}}function $(){let t,n,e,i=0,r=0,s=1,o=1,l=24,a=8,c=j,h=L,u=P,f=O,y=6;function d(){const d={nodes:u.apply(null,arguments),links:f.apply(null,arguments)};return function({nodes:t,links:n}){for(const[e,r]of t.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const i=new Map(t.map(((n,e)=>[c(n,e,t),n])));for(const[e,r]of n.entries()){r.index=e;let{source:t,target:n}=r;"object"!=typeof t&&(t=r.source=C(i,t)),"object"!=typeof n&&(n=r.target=C(i,n)),t.sourceLinks.push(r),n.targetLinks.push(r)}if(null!=e)for(const{sourceLinks:r,targetLinks:s}of t)r.sort(e),s.sort(e)}(d),function({nodes:t}){for(const n of t)n.value=void 0===n.fixedValue?Math.max(S(n.sourceLinks,N),S(n.targetLinks,N)):n.fixedValue}(d),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.depth=r;for(const{target:n}of t.sourceLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(d),function({nodes:t}){const n=t.length;let e=new Set(t),i=new Set,r=0;for(;e.size;){for(const t of e){t.height=r;for(const{source:n}of t.targetLinks)i.add(n)}if(++r>n)throw new Error("circular link");e=i,i=new Set}}(d),function(e){const c=function({nodes:t}){const e=b(t,(t=>t.depth))+1,r=(s-i-l)/(e-1),o=new Array(e);for(const n of t){const t=Math.max(0,Math.min(e-1,Math.floor(h.call(null,n,e))));n.layer=t,n.x0=i+t*r,n.x1=n.x0+l,o[t]?o[t].push(n):o[t]=[n]}if(n)for(const i of o)i.sort(n);return o}(e);t=Math.min(a,(o-r)/(b(c,(t=>t.length))-1)),function(n){const e=w(n,(n=>(o-r-(n.length-1)*t)/S(n,N)));for(const i of n){let n=r;for(const r of i){r.y0=n,r.y1=n+r.value*e,n=r.y1+t;for(const t of r.sourceLinks)t.width=t.value*e}n=(o-n+t)/(i.length+1);for(let t=0;t<i.length;++t){const e=i[t];e.y0+=n*(t+1),e.y1+=n*(t+1)}v(i)}}(c);for(let t=0;t<y;++t){const n=Math.pow(.99,t),e=Math.max(1-n,(t+1)/y);g(c,n,e),p(c,n,e)}}(d),D(d),d}function p(t,e,i){for(let r=1,s=t.length;r<s;++r){const s=t[r];for(const t of s){let n=0,i=0;for(const{source:e,value:s}of t.targetLinks){let r=s*(t.layer-e.layer);n+=E(e,t)*r,i+=r}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,k(t)}void 0===n&&s.sort(T),_(s,i)}}function g(t,e,i){for(let r=t.length-2;r>=0;--r){const s=t[r];for(const t of s){let n=0,i=0;for(const{target:e,value:s}of t.sourceLinks){let r=s*(e.layer-t.layer);n+=$(t,e)*r,i+=r}if(!(i>0))continue;let r=(n/i-t.y0)*e;t.y0+=r,t.y1+=r,k(t)}void 0===n&&s.sort(T),_(s,i)}}function _(n,e){const i=n.length>>1,s=n[i];x(n,s.y0-t,i-1,e),m(n,s.y1+t,i+1,e),x(n,o,n.length-1,e),m(n,r,0,e)}function m(n,e,i,r){for(;i<n.length;++i){const s=n[i],o=(e-s.y0)*r;o>1e-6&&(s.y0+=o,s.y1+=o),e=s.y1+t}}function x(n,e,i,r){for(;i>=0;--i){const s=n[i],o=(s.y1-e)*r;o>1e-6&&(s.y0-=o,s.y1-=o),e=s.y0-t}}function k({sourceLinks:t,targetLinks:n}){if(void 0===e){for(const{source:{sourceLinks:t}}of n)t.sort(I);for(const{target:{targetLinks:n}}of t)n.sort(M)}}function v(t){if(void 0===e)for(const{sourceLinks:n,targetLinks:e}of t)n.sort(I),e.sort(M)}function E(n,e){let i=n.y0-(n.sourceLinks.length-1)*t/2;for(const{target:r,width:s}of n.sourceLinks){if(r===e)break;i+=s+t}for(const{source:t,width:r}of e.targetLinks){if(t===n)break;i-=r}return i}function $(n,e){let i=e.y0-(e.targetLinks.length-1)*t/2;for(const{source:r,width:s}of e.targetLinks){if(r===n)break;i+=s+t}for(const{target:t,width:r}of n.sourceLinks){if(t===e)break;i-=r}return i}return d.update=function(t){return D(t),t},d.nodeId=function(t){return arguments.length?(c="function"==typeof t?t:A(t),d):c},d.nodeAlign=function(t){return arguments.length?(h="function"==typeof t?t:A(t),d):h},d.nodeSort=function(t){return arguments.length?(n=t,d):n},d.nodeWidth=function(t){return arguments.length?(l=+t,d):l},d.nodePadding=function(n){return arguments.length?(a=t=+n,d):a},d.nodes=function(t){return arguments.length?(u="function"==typeof t?t:A(t),d):u},d.links=function(t){return arguments.length?(f="function"==typeof t?t:A(t),d):f},d.linkSort=function(t){return arguments.length?(e=t,d):e},d.size=function(t){return arguments.length?(i=r=0,s=+t[0],o=+t[1],d):[s-i,o-r]},d.extent=function(t){return arguments.length?(i=+t[0][0],s=+t[1][0],r=+t[0][1],o=+t[1][1],d):[[i,r],[s,o]]},d.iterations=function(t){return arguments.length?(y=+t,d):y},d}1===(k=x).length&&(v=k,k=function(t,n){return x(v(t),n)});var z=Math.PI,F=2*z,U=1e-6,W=F-U;function G(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function X(){return new G}function q(t){return function(){return t}}function V(t){return t[0]}function Q(t){return t[1]}G.prototype=X.prototype={constructor:G,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,i){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+i)},bezierCurveTo:function(t,n,e,i,r,s){this._+="C"+ +t+","+ +n+","+ +e+","+ +i+","+(this._x1=+r)+","+(this._y1=+s)},arcTo:function(t,n,e,i,r){t=+t,n=+n,e=+e,i=+i,r=+r;var s=this._x1,o=this._y1,l=e-t,a=i-n,c=s-t,h=o-n,u=c*c+h*h;if(r<0)throw new Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(u>U)if(Math.abs(h*l-a*c)>U&&r){var f=e-s,y=i-o,d=l*l+a*a,p=f*f+y*y,g=Math.sqrt(d),_=Math.sqrt(u),m=r*Math.tan((z-Math.acos((d+u-p)/(2*g*_)))/2),x=m/_,k=m/g;Math.abs(x-1)>U&&(this._+="L"+(t+x*c)+","+(n+x*h)),this._+="A"+r+","+r+",0,0,"+ +(h*f>c*y)+","+(this._x1=t+k*l)+","+(this._y1=n+k*a)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,i,r,s){t=+t,n=+n,s=!!s;var o=(e=+e)*Math.cos(i),l=e*Math.sin(i),a=t+o,c=n+l,h=1^s,u=s?i-r:r-i;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+a+","+c:(Math.abs(this._x1-a)>U||Math.abs(this._y1-c)>U)&&(this._+="L"+a+","+c),e&&(u<0&&(u=u%F+F),u>W?this._+="A"+e+","+e+",0,1,"+h+","+(t-o)+","+(n-l)+"A"+e+","+e+",0,1,"+h+","+(this._x1=a)+","+(this._y1=c):u>U&&(this._+="A"+e+","+e+",0,"+ +(u>=z)+","+h+","+(this._x1=t+e*Math.cos(r))+","+(this._y1=n+e*Math.sin(r))))},rect:function(t,n,e,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +i+"h"+-e+"Z"},toString:function(){return this._}};var R=Array.prototype.slice;function Y(t){return t.source}function B(t){return t.target}function K(t,n,e,i,r){t.moveTo(n,e),t.bezierCurveTo(n=(n+i)/2,e,n,r,i,r)}function Z(){return function(t){var n=Y,e=B,i=V,r=Q,s=null;function o(){var o,l=R.call(arguments),a=n.apply(this,l),c=e.apply(this,l);if(s||(s=o=X()),t(s,+i.apply(this,(l[0]=a,l)),+r.apply(this,l),+i.apply(this,(l[0]=c,l)),+r.apply(this,l)),o)return s=null,o+""||null}return o.source=function(t){return arguments.length?(n=t,o):n},o.target=function(t){return arguments.length?(e=t,o):e},o.x=function(t){return arguments.length?(i="function"==typeof t?t:q(+t),o):i},o.y=function(t){return arguments.length?(r="function"==typeof t?t:q(+t),o):r},o.context=function(t){return arguments.length?(s=null==t?null:t,o):s},o}(K)}function H(t){return[t.source.x1,t.y0]}function J(t){return[t.target.x0,t.y1]}var tt=function(){var t=i((function(t,n,e,i){for(e=e||{},i=t.length;i--;e[t[i]]=n);return e}),"o"),n=[1,9],e=[1,10],r=[1,5,10,12],s={trace:i((function(){}),"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:i((function(t,n,e,i,r,s,o){var l=s.length-1;switch(r){case 7:const t=i.findOrCreateNode(s[l-4].trim().replaceAll('""','"')),n=i.findOrCreateNode(s[l-2].trim().replaceAll('""','"')),e=parseFloat(s[l].trim());i.addLink(t,n,e);break;case 8:case 9:case 11:this.$=s[l];break;case 10:this.$=s[l-1]}}),"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:e},{1:[2,6],7:11,10:[1,12]},t(e,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(r,[2,8]),t(r,[2,9]),{19:[1,16]},t(r,[2,11]),{1:[2,1]},{1:[2,5]},t(e,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:e},{15:18,16:7,17:8,18:n,20:e},{18:[1,19]},t(e,[2,3]),{12:[1,20]},t(r,[2,10]),{15:21,16:7,17:8,18:n,20:e},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:i((function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)}),"parseError"),parse:i((function(t){var n=this,e=[0],r=[],s=[null],o=[],l=this.table,a="",c=0,h=0,u=o.slice.call(arguments,1),f=Object.create(this.lexer),y={yy:{}};for(var d in this.yy)Object.prototype.hasOwnProperty.call(this.yy,d)&&(y.yy[d]=this.yy[d]);f.setInput(t,y.yy),y.yy.lexer=f,y.yy.parser=this,void 0===f.yylloc&&(f.yylloc={});var p=f.yylloc;o.push(p);var g=f.options&&f.options.ranges;function _(){var t;return"number"!=typeof(t=r.pop()||f.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i((function(t){e.length=e.length-2*t,s.length=s.length-t,o.length=o.length-t}),"popStack"),i(_,"lex");for(var m,x,k,v,b,w,S,E,L={};;){if(x=e[e.length-1],this.defaultActions[x]?k=this.defaultActions[x]:(null==m&&(m=_()),k=l[x]&&l[x][m]),void 0===k||!k.length||!k[0]){var A="";for(b in E=[],l[x])this.terminals_[b]&&b>2&&E.push("'"+this.terminals_[b]+"'");A=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:f.match,token:this.terminals_[m]||m,line:f.yylineno,loc:p,expected:E})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+m);switch(k[0]){case 1:e.push(m),s.push(f.yytext),o.push(f.yylloc),e.push(k[1]),m=null,h=f.yyleng,a=f.yytext,c=f.yylineno,p=f.yylloc;break;case 2:if(w=this.productions_[k[1]][1],L.$=s[s.length-w],L._$={first_line:o[o.length-(w||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(w||1)].first_column,last_column:o[o.length-1].last_column},g&&(L._$.range=[o[o.length-(w||1)].range[0],o[o.length-1].range[1]]),void 0!==(v=this.performAction.apply(L,[a,h,c,y.yy,k[1],s,o].concat(u))))return v;w&&(e=e.slice(0,-1*w*2),s=s.slice(0,-1*w),o=o.slice(0,-1*w)),e.push(this.productions_[k[1]][0]),s.push(L.$),o.push(L._$),S=l[e[e.length-2]][e[e.length-1]],e.push(S);break;case 3:return!0}}return!0}),"parse")},o=function(){return{EOF:1,parseError:i((function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)}),"parseError"),setInput:i((function(t,n){return this.yy=n||this.yy||{},this._input=t,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:i((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.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),t}),"input"),unput:i((function(t){var n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;var i=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),e.length-1&&(this.yylineno-=e.length-1);var r=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:e?(e.length===i.length?this.yylloc.first_column:0)+i[i.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this}),"unput"),more:i((function(){return this._more=!0,this}),"more"),reject:i((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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:i((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:i((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:i((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:i((function(){var t=this.pastInput(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"}),"showPosition"),test_match:i((function(t,n){var e,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var s in r)this[s]=r[s];return!1}return!1}),"test_match"),next:i((function(){if(this.done)return this.EOF;var t,n,e,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),s=0;s<r.length;s++)if((e=this._input.match(this.rules[r[s]]))&&(!n||e[0].length>n[0].length)){if(n=e,i=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,r[s])))return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?!1!==(t=this.test_match(n,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:i((function(){var t=this.next();return t||this.lex()}),"lex"),begin:i((function(t){this.conditionStack.push(t)}),"begin"),popState:i((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:i((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:i((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:i((function(t){this.begin(t)}),"pushState"),stateStackSize:i((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:i((function(t,n,e,i){switch(e){case 0:return this.pushState("csv"),4;case 1:return 10;case 2:return 5;case 3:return 12;case 4:return this.pushState("escaped_text"),18;case 5:return 20;case 6:return this.popState("escaped_text"),18;case 7:return 19}}),"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[1,2,3,4,5,6,7],inclusive:!1},escaped_text:{rules:[6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}}}();function l(){this.yy={}}return s.lexer=o,i(l,"Parser"),l.prototype=s,s.Parser=l,new l}();tt.parser=tt;var nt=tt,et=[],it=[],rt=new Map,st=i((()=>{et=[],it=[],rt=new Map,y()}),"clear"),ot=(i(t=class{constructor(t,n,e=0){this.source=t,this.target=n,this.value=e}},"SankeyLink"),t),lt=i(((t,n,e)=>{et.push(new ot(t,n,e))}),"addLink"),at=(i(n=class{constructor(t){this.ID=t}},"SankeyNode"),n),ct=i((t=>{t=d.sanitizeText(t,h());let n=rt.get(t);return void 0===n&&(n=new at(t),rt.set(t,n),it.push(n)),n}),"findOrCreateNode"),ht=i((()=>it),"getNodes"),ut=i((()=>et),"getLinks"),ft=i((()=>({nodes:it.map((t=>({id:t.ID}))),links:et.map((t=>({source:t.source.ID,target:t.target.ID,value:t.value})))})),"getGraph"),yt={nodesMap:rt,getConfig:i((()=>h().sankey),"getConfig"),getNodes:ht,getLinks:ut,getGraph:ft,addLink:lt,findOrCreateNode:ct,getAccTitle:c,setAccTitle:a,getAccDescription:l,setAccDescription:o,getDiagramTitle:s,setDiagramTitle:r,clear:st},dt=(i(e=class{static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href=`#${t}`}toString(){return"url("+this.href+")"}},"Uid"),e.count=0,e),pt={left:function(t){return t.depth},right:function(t,n){return n-1-t.height},center:function(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?w(t.sourceLinks,E)-1:0},justify:L},gt={draw:i((function(t,n,e,r){const{securityLevel:s,sankey:o}=h(),l=u.sankey;let a;"sandbox"===s&&(a=p("#i"+n));const c=p("sandbox"===s?a.nodes()[0].contentDocument.body:"body"),y="sandbox"===s?c.select(`[id="${n}"]`):p(`[id="${n}"]`),d=(null==o?void 0:o.width)??l.width,_=(null==o?void 0:o.height)??l.width,x=(null==o?void 0:o.useMaxWidth)??l.useMaxWidth,k=(null==o?void 0:o.nodeAlignment)??l.nodeAlignment,v=(null==o?void 0:o.prefix)??l.prefix,b=(null==o?void 0:o.suffix)??l.suffix,w=(null==o?void 0:o.showValues)??l.showValues,S=r.db.getGraph(),E=pt[k];$().nodeId((t=>t.id)).nodeWidth(10).nodePadding(10+(w?15:0)).nodeAlign(E).extent([[0,0],[d,_]])(S);const L=g(m);y.append("g").attr("class","nodes").selectAll(".node").data(S.nodes).join("g").attr("class","node").attr("id",(t=>(t.uid=dt.next("node-")).id)).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"})).attr("x",(t=>t.x0)).attr("y",(t=>t.y0)).append("rect").attr("height",(t=>t.y1-t.y0)).attr("width",(t=>t.x1-t.x0)).attr("fill",(t=>L(t.id)));const A=i((({id:t,value:n})=>w?`${t}\n${v}${Math.round(100*n)/100}${b}`:t),"getText");y.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(S.nodes).join("text").attr("x",(t=>t.x0<d/2?t.x1+6:t.x0-6)).attr("y",(t=>(t.y1+t.y0)/2)).attr("dy",(w?"0":"0.35")+"em").attr("text-anchor",(t=>t.x0<d/2?"start":"end")).text(A);const M=y.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(S.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),I=(null==o?void 0:o.linkColor)??"gradient";if("gradient"===I){const t=M.append("linearGradient").attr("id",(t=>(t.uid=dt.next("linearGradient-")).id)).attr("gradientUnits","userSpaceOnUse").attr("x1",(t=>t.source.x1)).attr("x2",(t=>t.target.x0));t.append("stop").attr("offset","0%").attr("stop-color",(t=>L(t.source.id))),t.append("stop").attr("offset","100%").attr("stop-color",(t=>L(t.target.id)))}let T;switch(I){case"gradient":T=i((t=>t.uid),"coloring");break;case"source":T=i((t=>L(t.source.id)),"coloring");break;case"target":T=i((t=>L(t.target.id)),"coloring");break;default:T=I}M.append("path").attr("d",Z().source(H).target(J)).attr("stroke",T).attr("stroke-width",(t=>Math.max(1,t.width))),f(void 0,y,0,x)}),"draw")},_t=i((t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,"\n").trim()),"prepareTextForParsing"),mt=i((t=>`.label {\n font-family: ${t.fontFamily};\n }`),"getStyles"),xt=nt.parse.bind(nt);nt.parse=t=>xt(_t(t));var kt={styles:mt,parser:nt,db:yt,renderer:gt};export{kt as diagram};
|