cc-viewer 1.6.183 → 1.6.192
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/App-DuGHwadX.js +31 -0
- package/dist/assets/{AppHeader-Dc7WvorH.css → AppHeader-D8MCV07q.css} +3 -3
- package/dist/assets/AppHeader.module-CozRDKfP.js +573 -0
- package/dist/assets/Mobile-Bab634xx.js +10 -0
- package/dist/assets/_baseUniq-DJPPdHyT.js +1 -0
- package/dist/assets/arc-DZ3Bjq-l.js +1 -0
- package/dist/assets/architectureDiagram-Q4EWVU46-xy0J2lr0.js +36 -0
- package/dist/assets/blockDiagram-DXYQGD6D-CoUm8UC5.js +132 -0
- package/dist/assets/c4Diagram-AHTNJAMY-CFHX4Dfx.js +10 -0
- package/dist/assets/channel-G3S1FOvm.js +1 -0
- package/dist/assets/chunk-4BX2VUAB-CiktxOyY.js +1 -0
- package/dist/assets/chunk-4TB4RGXK-DHl7ZlQV.js +206 -0
- package/dist/assets/chunk-55IACEB6-DcgWxDD5.js +1 -0
- package/dist/assets/chunk-EDXVE4YY-DeUzWpQx.js +1 -0
- package/dist/assets/{chunk-FMBD7UC4-Bb0LARSp.js → chunk-FMBD7UC4-BCaKpugk.js} +2 -2
- package/dist/assets/chunk-OYMX7WX6-DKMEMbG9.js +231 -0
- package/dist/assets/chunk-QZHKN3VN-BREApeQ-.js +1 -0
- package/dist/assets/chunk-YZCP3GAM-BYW1PNda.js +1 -0
- package/dist/assets/classDiagram-6PBFFD2Q-B0-7EUsz.js +1 -0
- package/dist/assets/classDiagram-v2-HSJHXN6E-B0-7EUsz.js +1 -0
- package/dist/assets/clone-CX_D5SrR.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-DpwiMCiq.js +1 -0
- package/dist/assets/cytoscape.esm-BMgRe88L.js +331 -0
- package/dist/assets/dagre-KV5264BT-Dc7qbya2.js +4 -0
- package/dist/assets/defaultLocale-CcTwRAjA.js +1 -0
- package/dist/assets/diagram-5BDNPKRD-v7FsHeLQ.js +10 -0
- package/dist/assets/diagram-G4DWMVQ6-BhKNBlcE.js +24 -0
- package/dist/assets/diagram-MMDJMWI5-C-3cRdzG.js +43 -0
- package/dist/assets/diagram-TYMM5635-HfNcJIfT.js +24 -0
- package/dist/assets/erDiagram-SMLLAGMA-Ckj0dkk7.js +85 -0
- package/dist/assets/flowDiagram-DWJPFMVM-yf315tJr.js +162 -0
- package/dist/assets/ganttDiagram-T4ZO3ILL-Ch2bINVC.js +292 -0
- package/dist/assets/gitGraphDiagram-UUTBAWPF-CesdgsJi.js +106 -0
- package/dist/assets/graph-CRpmapJV.js +1 -0
- package/dist/assets/html2canvas.esm-B8c0f9Wq.js +22 -0
- package/dist/assets/index-DJ0iGKLy.js +2 -0
- package/dist/assets/infoDiagram-42DDH7IO-CuD16P9Y.js +2 -0
- package/dist/assets/init-C7FSzFHJ.js +1 -0
- package/dist/assets/ishikawaDiagram-UXIWVN3A-4y8aG54G.js +70 -0
- package/dist/assets/journeyDiagram-VCZTEJTY-B6TtR2Zk.js +139 -0
- package/dist/assets/kanban-definition-6JOO6SKY-DTcNHYUS.js +89 -0
- package/dist/assets/katex-CJRKSY_b.js +257 -0
- package/dist/assets/layout-CX5hpkD2.js +1 -0
- package/dist/assets/linear-tWlC-NXc.js +1 -0
- package/dist/assets/mermaid.core-DNvsWVDx.js +308 -0
- package/dist/assets/min-CDExe3RN.js +1 -0
- package/dist/assets/mindmap-definition-QFDTVHPH-CW0yNQcb.js +96 -0
- package/dist/assets/ordinal-aRyHI6gl.js +1 -0
- package/dist/assets/pieDiagram-DEJITSTG-DNrnOqmz.js +30 -0
- package/dist/assets/quadrantDiagram-34T5L4WZ-Cl176vnh.js +7 -0
- package/dist/assets/requirementDiagram-MS252O5E-DKp3A5f_.js +84 -0
- package/dist/assets/sankeyDiagram-XADWPNL6-BMV0lAz8.js +10 -0
- package/dist/assets/sequenceDiagram-FGHM5R23-CQ4preep.js +157 -0
- package/dist/assets/stateDiagram-FHFEXIEX-BKqYYN8H.js +1 -0
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-C1W1ECmZ.js +1 -0
- package/dist/assets/timeline-definition-GMOUNBTQ-4kgeuumv.js +120 -0
- package/dist/assets/vendor-antd-Dk5s46Ag.js +406 -0
- package/dist/assets/vendor-codemirror-DxvDOrio.js +46 -0
- package/dist/assets/vendor-highlight-DVwgAdJY.js +3 -0
- package/dist/assets/vendor-markdown-DO-Ppp4f.js +60 -0
- package/dist/assets/vendor-qrcode-hI5wlAgK.js +9 -0
- package/dist/assets/vendor-virtuoso-HW77kTCh.js +1 -0
- package/dist/assets/vendor-xterm-D2cUrYEx.js +140 -0
- package/dist/assets/vennDiagram-DHZGUBPP-CqBcUIdK.js +34 -0
- package/dist/assets/wardley-RL74JXVD-CbEnkKx8.js +162 -0
- package/dist/assets/wardleyDiagram-NUSXRM2D-BJrjkZMg.js +20 -0
- package/dist/assets/xychartDiagram-5P7HB3ND-D8aBEz8e.js +7 -0
- package/dist/index.html +3 -3
- package/package.json +1 -1
- package/server.js +13 -4
- package/dist/assets/App-BHfyP8-J.js +0 -31
- package/dist/assets/AppHeader.module-W_78JZt9.js +0 -573
- package/dist/assets/Mobile-ca5EOMpN.js +0 -10
- package/dist/assets/_baseUniq-DYSZB4Xx.js +0 -1
- package/dist/assets/arc-BChSP8hM.js +0 -1
- package/dist/assets/architectureDiagram-Q4EWVU46-vlr5Q6DQ.js +0 -36
- package/dist/assets/blockDiagram-DXYQGD6D-4C3Amh2i.js +0 -132
- package/dist/assets/c4Diagram-AHTNJAMY-wI0efLSs.js +0 -10
- package/dist/assets/channel-d8DITadq.js +0 -1
- package/dist/assets/chunk-4BX2VUAB-BX9brpDB.js +0 -1
- package/dist/assets/chunk-4TB4RGXK-DvFQ-X9V.js +0 -206
- package/dist/assets/chunk-55IACEB6-BNmYjPNf.js +0 -1
- package/dist/assets/chunk-EDXVE4YY-BNvDPqBE.js +0 -1
- package/dist/assets/chunk-OYMX7WX6-BwlvIpeD.js +0 -231
- package/dist/assets/chunk-QZHKN3VN-BS6RK8_X.js +0 -1
- package/dist/assets/chunk-YZCP3GAM-oOqmydQz.js +0 -1
- package/dist/assets/classDiagram-6PBFFD2Q-B1oRrMCc.js +0 -1
- package/dist/assets/classDiagram-v2-HSJHXN6E-B1oRrMCc.js +0 -1
- package/dist/assets/clone-BrNOd7Lq.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-CamsIqkY.js +0 -1
- package/dist/assets/cytoscape.esm-DxGcaOPV.js +0 -331
- package/dist/assets/dagre-KV5264BT-CPAWWiBh.js +0 -4
- package/dist/assets/defaultLocale-DX6XiGOO.js +0 -1
- package/dist/assets/diagram-5BDNPKRD-D6TmzGhl.js +0 -10
- package/dist/assets/diagram-G4DWMVQ6-DDuJnMCL.js +0 -24
- package/dist/assets/diagram-MMDJMWI5-CQWhvrpz.js +0 -43
- package/dist/assets/diagram-TYMM5635-CEDj3w_h.js +0 -24
- package/dist/assets/erDiagram-SMLLAGMA-B_eQqha6.js +0 -85
- package/dist/assets/flowDiagram-DWJPFMVM-B985i3uQ.js +0 -162
- package/dist/assets/ganttDiagram-T4ZO3ILL-DKp62vr3.js +0 -292
- package/dist/assets/gitGraphDiagram-UUTBAWPF-Cc1gyz1Q.js +0 -106
- package/dist/assets/graph-C-1-3bsA.js +0 -1
- package/dist/assets/html2canvas.esm-QH1iLAAe.js +0 -22
- package/dist/assets/index-LH2WLu05.js +0 -2
- package/dist/assets/infoDiagram-42DDH7IO-DqXaAHZz.js +0 -2
- package/dist/assets/init-Gi6I4Gst.js +0 -1
- package/dist/assets/ishikawaDiagram-UXIWVN3A-zdUdDJX2.js +0 -70
- package/dist/assets/journeyDiagram-VCZTEJTY-ip5SzODy.js +0 -139
- package/dist/assets/kanban-definition-6JOO6SKY-D5EYh6AP.js +0 -89
- package/dist/assets/katex-DkKDou_j.js +0 -257
- package/dist/assets/layout-Cjq8AL8G.js +0 -1
- package/dist/assets/linear-U0KsEJ2u.js +0 -1
- package/dist/assets/mermaid.core-CT-5crLN.js +0 -308
- package/dist/assets/min-C7G6pq26.js +0 -1
- package/dist/assets/mindmap-definition-QFDTVHPH-CIzhFOw1.js +0 -96
- package/dist/assets/ordinal-Cboi1Yqb.js +0 -1
- package/dist/assets/pieDiagram-DEJITSTG-Cp1Zd1MQ.js +0 -30
- package/dist/assets/quadrantDiagram-34T5L4WZ-Cp31xM90.js +0 -7
- package/dist/assets/requirementDiagram-MS252O5E-Dbg_eQqB.js +0 -84
- package/dist/assets/sankeyDiagram-XADWPNL6-CMrzwpwC.js +0 -10
- package/dist/assets/sequenceDiagram-FGHM5R23-KJegoBnN.js +0 -157
- package/dist/assets/stateDiagram-FHFEXIEX-BDWprYzE.js +0 -1
- package/dist/assets/stateDiagram-v2-QKLJ7IA2-CCUmB0qI.js +0 -1
- package/dist/assets/timeline-definition-GMOUNBTQ-BOWeG5LY.js +0 -120
- package/dist/assets/vendor-antd-CtdKd5xs.js +0 -406
- package/dist/assets/vendor-codemirror-CdXaVX4e.js +0 -46
- package/dist/assets/vendor-highlight-D4ATuRwX.js +0 -3
- package/dist/assets/vendor-markdown-CO-jRjTB.js +0 -60
- package/dist/assets/vendor-qrcode-D05RfzwB.js +0 -9
- package/dist/assets/vendor-virtuoso-BhnFrbmh.js +0 -1
- package/dist/assets/vendor-xterm-DWMOrwSy.js +0 -140
- package/dist/assets/vennDiagram-DHZGUBPP-B6mLodPk.js +0 -34
- package/dist/assets/wardley-RL74JXVD-CovHs24Z.js +0 -162
- package/dist/assets/wardleyDiagram-NUSXRM2D-CBg_VXF7.js +0 -20
- package/dist/assets/xychartDiagram-5P7HB3ND-BRxgk_oX.js +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as baseFlatten,a as baseEach,c as baseIteratee,d as arrayMap,i as isSymbol}from"./_baseUniq-DJPPdHyT.js";import{aF as isArrayLike,aG as isArray,aH as identity}from"./mermaid.core-DNvsWVDx.js";function flatten(array){var length=array==null?0:array.length;return length?baseFlatten(array):[]}function baseMap(collection,iteratee){var index=-1,result=isArrayLike(collection)?Array(collection.length):[];return baseEach(collection,function(value,key,collection2){result[++index]=iteratee(value,key,collection2)}),result}function map(collection,iteratee){var func=isArray(collection)?arrayMap:baseMap;return func(collection,baseIteratee(iteratee))}function baseLt(value,other){return value<other}function baseExtremum(array,iteratee,comparator){for(var index=-1,length=array.length;++index<length;){var value=array[index],current=iteratee(value);if(current!=null&&(computed===void 0?current===current&&!isSymbol(current):comparator(current,computed)))var computed=current,result=value}return result}function min(array){return array&&array.length?baseExtremum(array,identity,baseLt):void 0}export{baseLt as a,baseExtremum as b,baseMap as c,min as d,flatten as f,map as m};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import{g as getDiagramElement}from"./chunk-55IACEB6-DcgWxDD5.js";import{s as setupViewPortForSVG}from"./chunk-EDXVE4YY-DeUzWpQx.js";import{_ as __name,l as log,o as getRegisteredLayoutAlgorithm,r as render,C as getConfig,F as defaultConfig_default,c as getConfig2,i as sanitizeText,aE as getUserDefinedConfig,U as isDark,V as lighten,W as darken}from"./mermaid.core-DNvsWVDx.js";import"./index-DJ0iGKLy.js";import"./vendor-codemirror-DxvDOrio.js";import"./vendor-antd-Dk5s46Ag.js";import"./vendor-markdown-DO-Ppp4f.js";const byteToHex=[];for(let i=0;i<256;++i)byteToHex.push((i+256).toString(16).slice(1));function unsafeStringify(arr,offset=0){return(byteToHex[arr[offset+0]]+byteToHex[arr[offset+1]]+byteToHex[arr[offset+2]]+byteToHex[arr[offset+3]]+"-"+byteToHex[arr[offset+4]]+byteToHex[arr[offset+5]]+"-"+byteToHex[arr[offset+6]]+byteToHex[arr[offset+7]]+"-"+byteToHex[arr[offset+8]]+byteToHex[arr[offset+9]]+"-"+byteToHex[arr[offset+10]]+byteToHex[arr[offset+11]]+byteToHex[arr[offset+12]]+byteToHex[arr[offset+13]]+byteToHex[arr[offset+14]]+byteToHex[arr[offset+15]]).toLowerCase()}let getRandomValues;const rnds8=new Uint8Array(16);function rng(){if(!getRandomValues){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");getRandomValues=crypto.getRandomValues.bind(crypto)}return getRandomValues(rnds8)}const randomUUID=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),native={randomUUID};function v4(options,buf,offset){var _a2;if(native.randomUUID&&!options)return native.randomUUID();options=options||{};const rnds=options.random??((_a2=options.rng)==null?void 0:_a2.call(options))??rng();if(rnds.length<16)throw new Error("Random bytes length must be >= 16");return rnds[6]=rnds[6]&15|64,rnds[8]=rnds[8]&63|128,unsafeStringify(rnds)}var parser=(function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,4],$V1=[1,13],$V2=[1,12],$V3=[1,15],$V4=[1,16],$V5=[1,20],$V6=[1,19],$V7=[6,7,8],$V8=[1,26],$V9=[1,24],$Va=[1,25],$Vb=[6,7,11],$Vc=[1,6,13,15,16,19,22],$Vd=[1,33],$Ve=[1,34],$Vf=[1,6,7,11,13,15,16,19,22],parser2={trace:__name(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:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 6:case 7:return yy;case 8:yy.getLogger().trace("Stop NL ");break;case 9:yy.getLogger().trace("Stop EOF ");break;case 11:yy.getLogger().trace("Stop NL2 ");break;case 12:yy.getLogger().trace("Stop EOF2 ");break;case 15:yy.getLogger().info("Node: ",$$[$0].id),yy.addNode($$[$0-1].length,$$[$0].id,$$[$0].descr,$$[$0].type);break;case 16:yy.getLogger().trace("Icon: ",$$[$0]),yy.decorateNode({icon:$$[$0]});break;case 17:case 21:yy.decorateNode({class:$$[$0]});break;case 18:yy.getLogger().trace("SPACELIST");break;case 19:yy.getLogger().trace("Node: ",$$[$0].id),yy.addNode(0,$$[$0].id,$$[$0].descr,$$[$0].type);break;case 20:yy.decorateNode({icon:$$[$0]});break;case 25:yy.getLogger().trace("node found ..",$$[$0-2]),this.$={id:$$[$0-1],descr:$$[$0-1],type:yy.getType($$[$0-2],$$[$0])};break;case 26:this.$={id:$$[$0],descr:$$[$0],type:yy.nodeType.DEFAULT};break;case 27:yy.getLogger().trace("node found ..",$$[$0-3]),this.$={id:$$[$0-3],descr:$$[$0-1],type:yy.getType($$[$0-2],$$[$0])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:$V0},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:$V0},{6:$V1,7:[1,10],9:9,12:11,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},o($V7,[2,3]),{1:[2,2]},o($V7,[2,4]),o($V7,[2,5]),{1:[2,6],6:$V1,12:21,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},{6:$V1,9:22,12:11,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},{6:$V8,7:$V9,10:23,11:$Va},o($Vb,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:$V5,22:$V6}),o($Vb,[2,18]),o($Vb,[2,19]),o($Vb,[2,20]),o($Vb,[2,21]),o($Vb,[2,23]),o($Vb,[2,24]),o($Vb,[2,26],{19:[1,30]}),{20:[1,31]},{6:$V8,7:$V9,10:32,11:$Va},{1:[2,7],6:$V1,12:21,13:$V2,14:14,15:$V3,16:$V4,17:17,18:18,19:$V5,22:$V6},o($Vc,[2,14],{7:$Vd,11:$Ve}),o($Vf,[2,8]),o($Vf,[2,9]),o($Vf,[2,10]),o($Vb,[2,15]),o($Vb,[2,16]),o($Vb,[2,17]),{20:[1,35]},{21:[1,36]},o($Vc,[2,13],{7:$Vd,11:$Ve}),o($Vf,[2,11]),o($Vf,[2,12]),{21:[1,37]},o($Vb,[2,25]),o($Vb,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:__name(function(str,hash){if(hash.recoverable)this.trace(str);else{var error=new Error(str);throw error.hash=hash,error}},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,TERROR=2,EOF=1,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,typeof lexer2.yylloc>"u"&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;typeof sharedState.yy.parseError=="function"?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function popStack(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n}__name(popStack,"popStack");function lex(){var token;return token=tstack.pop()||lexer2.lex()||EOF,typeof token!="number"&&(token instanceof Array&&(tstack=token,token=tstack.pop()),token=self.symbols_[token]||token),token}__name(lex,"lex");for(var symbol,state,action,r,yyval={},p,len,newState,expected;;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:((symbol===null||typeof symbol>"u")&&(symbol=lex()),action=table[state]&&table[state][symbol]),typeof action>"u"||!action.length||!action[0]){var errStr="";expected=[];for(p in table[state])this.terminals_[p]&&p>TERROR&&expected.push("'"+this.terminals_[p]+"'");lexer2.showPosition?errStr="Parse error on line "+(yylineno+1)+`:
|
|
2
|
+
`+lexer2.showPosition()+`
|
|
3
|
+
Expecting `+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":errStr="Parse error on line "+(yylineno+1)+": Unexpected "+(symbol==EOF?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args)),typeof r<"u")return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=(function(){var lexer2={EOF:1,parseError:__name(function(str,hash){if(this.yy.parser)this.yy.parser.parseError(str,hash);else throw new Error(str)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,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:__name(function(){var ch=this._input[0];this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch;var lines=ch.match(/(?:\r\n?|\n).*/g);return lines?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=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),lines.length-1&&(this.yylineno-=lines.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:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+`
|
|
5
|
+
`+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={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&&(backup.yylloc.range=this.yylloc.range.slice(0))),lines=match[0].match(/(?:\r\n?|\n).*/g),lines&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,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(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var token,match,tempMatch,index;this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if(tempMatch=this._input.match(this.rules[rules[i]]),tempMatch&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(token=this.test_match(tempMatch,rules[i]),token!==!1)return token;if(this._backtrack){match=!1;continue}else return!1}else if(!this.options.flex)break}return match?(token=this.test_match(match,rules[index]),token!==!1?token:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(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:__name(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return yy.getLogger().trace("Found comment",yy_.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:yy.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return yy.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:yy.getLogger().trace("end icon"),this.popState();break;case 10:return yy.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return yy.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return yy.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return yy.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:return this.begin("NODE"),19;case 15:return this.begin("NODE"),19;case 16:return this.begin("NODE"),19;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 23:this.popState();break;case 24:yy.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return yy.getLogger().trace("description:",yy_.yytext),"NODE_DESCR";case 26:this.popState();break;case 27:return this.popState(),yy.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),yy.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),yy.getLogger().trace("node end ...",yy_.yytext),"NODE_DEND";case 30:return this.popState(),yy.getLogger().trace("node end (("),"NODE_DEND";case 31:return this.popState(),yy.getLogger().trace("node end (-"),"NODE_DEND";case 32:return this.popState(),yy.getLogger().trace("node end (-"),"NODE_DEND";case 33:return this.popState(),yy.getLogger().trace("node end (("),"NODE_DEND";case 34:return this.popState(),yy.getLogger().trace("node end (("),"NODE_DEND";case 35:return yy.getLogger().trace("Long description:",yy_.yytext),20;case 36:return yy.getLogger().trace("Long description:",yy_.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}}};return lexer2})();parser2.lexer=lexer;function Parser(){this.yy={}}return __name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser})();parser.parser=parser;var mindmap_default=parser,MAX_SECTIONS=12,nodeType={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},_a,MindmapDB=(_a=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=nodeType,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(level){for(let i=this.nodes.length-1;i>=0;i--)if(this.nodes[i].level<level)return this.nodes[i];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(level,id,descr,type){var _a2,_b;log.info("addNode",level,id,descr,type);let isRoot=!1;this.nodes.length===0?(this.baseLevel=level,level=0,isRoot=!0):this.baseLevel!==void 0&&(level=level-this.baseLevel,isRoot=!1);const conf=getConfig2();let padding=((_a2=conf.mindmap)==null?void 0:_a2.padding)??defaultConfig_default.mindmap.padding;switch(type){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:padding*=2;break}const node={id:this.count++,nodeId:sanitizeText(id,conf),level,descr:sanitizeText(descr,conf),type,children:[],width:((_b=conf.mindmap)==null?void 0:_b.maxNodeWidth)??defaultConfig_default.mindmap.maxNodeWidth,padding,isRoot},parent=this.getParent(level);if(parent)parent.children.push(node),this.nodes.push(node);else if(isRoot)this.nodes.push(node);else throw new Error(`There can be only one root. No parent could be found for ("${node.descr}")`)}getType(startStr,endStr){switch(log.debug("In get type",startStr,endStr),startStr){case"[":return this.nodeType.RECT;case"(":return endStr===")"?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(id,element){this.elements[id]=element}getElementById(id){return this.elements[id]}decorateNode(decoration){if(!decoration)return;const config=getConfig2(),node=this.nodes[this.nodes.length-1];decoration.icon&&(node.icon=sanitizeText(decoration.icon,config)),decoration.class&&(node.class=sanitizeText(decoration.class,config))}type2Str(type){switch(type){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(node,sectionNumber){if(node.level===0?node.section=void 0:node.section=sectionNumber,node.children)for(const[index,child]of node.children.entries()){const childSectionNumber=node.level===0?index%(MAX_SECTIONS-1):sectionNumber;this.assignSections(child,childSectionNumber)}}flattenNodes(node,processedNodes){const conf=getConfig2(),cssClasses=["mindmap-node"];node.isRoot===!0?cssClasses.push("section-root","section--1"):node.section!==void 0&&cssClasses.push(`section-${node.section}`),node.class&&cssClasses.push(node.class);const classes=cssClasses.join(" "),getShapeFromType=__name(type=>{var _a2;const isReduxTheme=(((_a2=conf.theme)==null?void 0:_a2.toLowerCase())??"").includes("redux");switch(type){case nodeType.CIRCLE:return"mindmapCircle";case nodeType.RECT:return"rect";case nodeType.ROUNDED_RECT:return"rounded";case nodeType.CLOUD:return"cloud";case nodeType.BANG:return"bang";case nodeType.HEXAGON:return"hexagon";case nodeType.DEFAULT:return isReduxTheme?"rounded":"defaultMindmapNode";case nodeType.NO_BORDER:default:return"rect"}},"getShapeFromType"),processedNode={id:node.id.toString(),domId:"node_"+node.id.toString(),label:node.descr,labelType:"markdown",isGroup:!1,shape:getShapeFromType(node.type),width:node.width,height:node.height??0,padding:node.padding,cssClasses:classes,cssStyles:[],look:conf.look,icon:node.icon,x:node.x,y:node.y,level:node.level,nodeId:node.nodeId,type:node.type,section:node.section};if(processedNodes.push(processedNode),node.children)for(const child of node.children)this.flattenNodes(child,processedNodes)}generateEdges(node,edges){if(!node.children)return;const conf=getConfig2();for(const child of node.children){let edgeClasses="edge";child.section!==void 0&&(edgeClasses+=` section-edge-${child.section}`);const edgeDepth=node.level+1;edgeClasses+=` edge-depth-${edgeDepth}`;const edge={id:`edge_${node.id}_${child.id}`,start:node.id.toString(),end:child.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:conf.look,classes:edgeClasses,depth:node.level,section:child.section};edges.push(edge),this.generateEdges(child,edges)}}getData(){const mindmapRoot=this.getMindmap(),config=getConfig2(),hasUserDefinedLayout=getUserDefinedConfig().layout!==void 0,finalConfig=config;if(hasUserDefinedLayout||(finalConfig.layout="cose-bilkent"),!mindmapRoot)return{nodes:[],edges:[],config:finalConfig};log.debug("getData: mindmapRoot",mindmapRoot,config),this.assignSections(mindmapRoot);const processedNodes=[],processedEdges=[];this.flattenNodes(mindmapRoot,processedNodes),this.generateEdges(mindmapRoot,processedEdges),log.debug(`getData: processed ${processedNodes.length} nodes and ${processedEdges.length} edges`);const shapes=new Map;for(const node of processedNodes)shapes.set(node.id,{shape:node.shape,width:node.width,height:node.height,padding:node.padding});return{nodes:processedNodes,edges:processedEdges,config:finalConfig,rootNode:mindmapRoot,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(shapes),type:"mindmap",diagramId:"mindmap-"+v4()}}getLogger(){return log}},__name(_a,"MindmapDB"),_a),draw=__name(async(text,id,_version,diagObj)=>{var _a2,_b;log.debug(`Rendering mindmap diagram
|
|
7
|
+
`+text);const db=diagObj.db,data4Layout=db.getData(),svg=getDiagramElement(id,data4Layout.config.securityLevel);if(data4Layout.type=diagObj.type,data4Layout.layoutAlgorithm=getRegisteredLayoutAlgorithm(data4Layout.config.layout,{fallback:"cose-bilkent"}),data4Layout.diagramId=id,!db.getMindmap())return;data4Layout.nodes.forEach(node=>{node.shape==="rounded"?(node.radius=15,node.taper=15,node.stroke="none",node.width=0,node.padding=15):node.shape==="circle"?node.padding=10:node.shape==="rect"?(node.width=0,node.padding=10):node.shape==="hexagon"&&(node.width=0,node.height=0)}),await render(data4Layout,svg);const{themeVariables}=getConfig(),{useGradient,gradientStart,gradientStop}=themeVariables;if(useGradient&&gradientStart&&gradientStop){const svgId=svg.attr("id"),gradient=svg.append("defs").append("linearGradient").attr("id",`${svgId}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");gradient.append("stop").attr("offset","0%").attr("stop-color",gradientStart).attr("stop-opacity",1),gradient.append("stop").attr("offset","100%").attr("stop-color",gradientStop).attr("stop-opacity",1)}setupViewPortForSVG(svg,((_a2=data4Layout.config.mindmap)==null?void 0:_a2.padding)??defaultConfig_default.mindmap.padding,"mindmapDiagram",((_b=data4Layout.config.mindmap)==null?void 0:_b.useMaxWidth)??defaultConfig_default.mindmap.useMaxWidth)},"draw"),mindmapRenderer_default={draw},genSections=__name(options=>{const{theme,look}=options;let sections="";for(let i=0;i<options.THEME_COLOR_LIMIT;i++)options["lineColor"+i]=options["lineColor"+i]||options["cScaleInv"+i],isDark(options["lineColor"+i])?options["lineColor"+i]=lighten(options["lineColor"+i],20):options["lineColor"+i]=darken(options["lineColor"+i],20);for(let i=0;i<options.THEME_COLOR_LIMIT;i++){const sw=""+(look==="neo"?Math.max(10-(i-1)*2,2):17-3*i);sections+=`
|
|
8
|
+
.section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {
|
|
9
|
+
fill: ${options["cScale"+i]};
|
|
10
|
+
}
|
|
11
|
+
.section-${i-1} text {
|
|
12
|
+
fill: ${options["cScaleLabel"+i]};
|
|
13
|
+
}
|
|
14
|
+
.section-${i-1} span {
|
|
15
|
+
color: ${options["cScaleLabel"+i]};
|
|
16
|
+
}
|
|
17
|
+
.node-icon-${i-1} {
|
|
18
|
+
font-size: 40px;
|
|
19
|
+
color: ${options["cScaleLabel"+i]};
|
|
20
|
+
}
|
|
21
|
+
.section-edge-${i-1}{
|
|
22
|
+
stroke: ${options["cScale"+i]};
|
|
23
|
+
}
|
|
24
|
+
.edge-depth-${i-1}{
|
|
25
|
+
stroke-width: ${sw};
|
|
26
|
+
}
|
|
27
|
+
.section-${i-1} line {
|
|
28
|
+
stroke: ${options["cScaleInv"+i]} ;
|
|
29
|
+
stroke-width: 3;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.disabled, .disabled circle, .disabled text {
|
|
33
|
+
fill: lightgray;
|
|
34
|
+
}
|
|
35
|
+
.disabled text {
|
|
36
|
+
fill: #efefef;
|
|
37
|
+
}
|
|
38
|
+
[data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {
|
|
39
|
+
fill: ${theme==="redux"||theme==="redux-dark"||theme==="neutral"?options.mainBkg:options["cScale"+i]};
|
|
40
|
+
stroke: ${theme==="redux"||theme==="redux-dark"?options.nodeBorder:options["cScale"+i]};
|
|
41
|
+
stroke-width: ${options.strokeWidth??2}px;
|
|
42
|
+
}
|
|
43
|
+
[data-look="neo"].section-edge-${i-1}{
|
|
44
|
+
stroke: ${theme!=null&&theme.includes("redux")||theme==="neo-dark"?options.nodeBorder:options["cScale"+i]};
|
|
45
|
+
}
|
|
46
|
+
[data-look="neo"].mindmap-node.section-${i-1} text {
|
|
47
|
+
fill: ${theme==="redux"||theme==="redux-dark"?options.nodeBorder:options["cScaleLabel"+(theme==="neutral"?1:i)]};
|
|
48
|
+
}
|
|
49
|
+
`}return sections},"genSections"),genGradient=__name((THEME_COLOR_LIMIT,svgId,mainBkg)=>{let sections="";for(let i=0;i<THEME_COLOR_LIMIT;i++)sections+=`
|
|
50
|
+
[data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {
|
|
51
|
+
stroke: url(${svgId}-gradient);
|
|
52
|
+
fill: ${mainBkg};
|
|
53
|
+
}
|
|
54
|
+
.section-${i-1} line {
|
|
55
|
+
stroke-width: 0;
|
|
56
|
+
}`;return sections},"genGradient"),getStyles=__name(options=>{const{theme}=options,svgId=options.svgId,scopedDropShadow=options.dropShadow?options.dropShadow.replace("url(#drop-shadow)",`url(${svgId}-drop-shadow)`):"none";return`
|
|
57
|
+
.edge {
|
|
58
|
+
stroke-width: 3;
|
|
59
|
+
}
|
|
60
|
+
${genSections(options)}
|
|
61
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
62
|
+
fill: ${options.git0};
|
|
63
|
+
}
|
|
64
|
+
.section-root text {
|
|
65
|
+
fill: ${options.gitBranchLabel0};
|
|
66
|
+
}
|
|
67
|
+
.section-root span {
|
|
68
|
+
color: ${theme!=null&&theme.includes("redux")?options.nodeBorder:options.gitBranchLabel0};
|
|
69
|
+
}
|
|
70
|
+
.icon-container {
|
|
71
|
+
height:100%;
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
align-items: center;
|
|
75
|
+
}
|
|
76
|
+
.edge {
|
|
77
|
+
fill: none;
|
|
78
|
+
}
|
|
79
|
+
.mindmap-node-label {
|
|
80
|
+
dy: 1em;
|
|
81
|
+
alignment-baseline: middle;
|
|
82
|
+
text-anchor: middle;
|
|
83
|
+
dominant-baseline: middle;
|
|
84
|
+
text-align: center;
|
|
85
|
+
}
|
|
86
|
+
[data-look="neo"].mindmap-node {
|
|
87
|
+
filter: ${scopedDropShadow};
|
|
88
|
+
}
|
|
89
|
+
[data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
|
|
90
|
+
fill: ${theme!=null&&theme.includes("redux")?options.mainBkg:options.git0};
|
|
91
|
+
}
|
|
92
|
+
[data-look="neo"].mindmap-node.section-root .text-inner-tspan {
|
|
93
|
+
fill: ${theme!=null&&theme.includes("redux")?options.nodeBorder:options["cScaleLabel"+(theme==="neutral"?1:0)]};
|
|
94
|
+
}
|
|
95
|
+
${options.useGradient&&svgId&&options.mainBkg?genGradient(options.THEME_COLOR_LIMIT,svgId,options.mainBkg):""}
|
|
96
|
+
`},"getStyles"),styles_default=getStyles,diagram={get db(){return new MindmapDB},renderer:mindmapRenderer_default,parser:mindmap_default,styles:styles_default};export{diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as initRange}from"./init-C7FSzFHJ.js";class InternMap extends Map{constructor(entries,key=keyof){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:key}}),entries!=null)for(const[key2,value]of entries)this.set(key2,value)}get(key){return super.get(intern_get(this,key))}has(key){return super.has(intern_get(this,key))}set(key,value){return super.set(intern_set(this,key),value)}delete(key){return super.delete(intern_delete(this,key))}}function intern_get({_intern,_key},value){const key=_key(value);return _intern.has(key)?_intern.get(key):value}function intern_set({_intern,_key},value){const key=_key(value);return _intern.has(key)?_intern.get(key):(_intern.set(key,value),value)}function intern_delete({_intern,_key},value){const key=_key(value);return _intern.has(key)&&(value=_intern.get(key),_intern.delete(key)),value}function keyof(value){return value!==null&&typeof value=="object"?value.valueOf():value}const implicit=Symbol("implicit");function ordinal(){var index=new InternMap,domain=[],range=[],unknown=implicit;function scale(d){let i=index.get(d);if(i===void 0){if(unknown!==implicit)return unknown;index.set(d,i=domain.push(d)-1)}return range[i%range.length]}return scale.domain=function(_){if(!arguments.length)return domain.slice();domain=[],index=new InternMap;for(const value of _)index.has(value)||index.set(value,domain.push(value)-1);return scale},scale.range=function(_){return arguments.length?(range=Array.from(_),scale):range.slice()},scale.unknown=function(_){return arguments.length?(unknown=_,scale):unknown},scale.copy=function(){return ordinal(domain,range).unknown(unknown)},initRange.apply(scale,arguments),scale}export{ordinal as o};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import{a3 as constant,a6 as tau,aD as array,g as getAccDescription,s as setAccDescription,a as getAccTitle,b as setAccTitle,q as getDiagramTitle,p as setDiagramTitle,_ as __name,l as log,c as getConfig2$1,E as cleanAndMerge,H as selectSvgElement,M as parseFontSize,e as configureSvgSize,y as clear,F as defaultConfig_default}from"./mermaid.core-DNvsWVDx.js";import{p as populateCommonDb}from"./chunk-4BX2VUAB-CiktxOyY.js";import{p as parse}from"./wardley-RL74JXVD-CbEnkKx8.js";import{d as d3arc}from"./arc-DZ3Bjq-l.js";import{o as ordinal}from"./ordinal-aRyHI6gl.js";import"./index-DJ0iGKLy.js";import"./vendor-codemirror-DxvDOrio.js";import"./vendor-antd-Dk5s46Ag.js";import"./vendor-markdown-DO-Ppp4f.js";import"./min-CDExe3RN.js";import"./_baseUniq-DJPPdHyT.js";import"./init-C7FSzFHJ.js";function descending(a,b){return b<a?-1:b>a?1:b>=a?0:NaN}function identity(d){return d}function d3pie(){var value=identity,sortValues=descending,sort=null,startAngle=constant(0),endAngle=constant(tau),padAngle=constant(0);function pie(data){var i,n=(data=array(data)).length,j,k,sum=0,index=new Array(n),arcs=new Array(n),a0=+startAngle.apply(this,arguments),da=Math.min(tau,Math.max(-tau,endAngle.apply(this,arguments)-a0)),a1,p=Math.min(Math.abs(da)/n,padAngle.apply(this,arguments)),pa=p*(da<0?-1:1),v;for(i=0;i<n;++i)(v=arcs[index[i]=i]=+value(data[i],i,data))>0&&(sum+=v);for(sortValues!=null?index.sort(function(i2,j2){return sortValues(arcs[i2],arcs[j2])}):sort!=null&&index.sort(function(i2,j2){return sort(data[i2],data[j2])}),i=0,k=sum?(da-n*pa)/sum:0;i<n;++i,a0=a1)j=index[i],v=arcs[j],a1=a0+(v>0?v*k:0)+pa,arcs[j]={data:data[j],index:i,value:v,startAngle:a0,endAngle:a1,padAngle:p};return arcs}return pie.value=function(_){return arguments.length?(value=typeof _=="function"?_:constant(+_),pie):value},pie.sortValues=function(_){return arguments.length?(sortValues=_,sort=null,pie):sortValues},pie.sort=function(_){return arguments.length?(sort=_,sortValues=null,pie):sort},pie.startAngle=function(_){return arguments.length?(startAngle=typeof _=="function"?_:constant(+_),pie):startAngle},pie.endAngle=function(_){return arguments.length?(endAngle=typeof _=="function"?_:constant(+_),pie):endAngle},pie.padAngle=function(_){return arguments.length?(padAngle=typeof _=="function"?_:constant(+_),pie):padAngle},pie}var DEFAULT_PIE_CONFIG=defaultConfig_default.pie,DEFAULT_PIE_DB={sections:new Map,showData:!1},sections=DEFAULT_PIE_DB.sections,showData=DEFAULT_PIE_DB.showData,config=structuredClone(DEFAULT_PIE_CONFIG),getConfig2=__name(()=>structuredClone(config),"getConfig"),clear2=__name(()=>{sections=new Map,showData=DEFAULT_PIE_DB.showData,clear()},"clear"),addSection=__name(({label,value})=>{if(value<0)throw new Error(`"${label}" has invalid value: ${value}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);sections.has(label)||(sections.set(label,value),log.debug(`added new section: ${label}, with value: ${value}`))},"addSection"),getSections=__name(()=>sections,"getSections"),setShowData=__name(toggle=>{showData=toggle},"setShowData"),getShowData=__name(()=>showData,"getShowData"),db={getConfig:getConfig2,clear:clear2,setDiagramTitle,getDiagramTitle,setAccTitle,getAccTitle,setAccDescription,getAccDescription,addSection,getSections,setShowData,getShowData},populateDb=__name((ast,db2)=>{populateCommonDb(ast,db2),db2.setShowData(ast.showData),ast.sections.map(db2.addSection)},"populateDb"),parser={parse:__name(async input=>{const ast=await parse("pie",input);log.debug(ast),populateDb(ast,db)},"parse")},getStyles=__name(options=>`
|
|
2
|
+
.pieCircle{
|
|
3
|
+
stroke: ${options.pieStrokeColor};
|
|
4
|
+
stroke-width : ${options.pieStrokeWidth};
|
|
5
|
+
opacity : ${options.pieOpacity};
|
|
6
|
+
}
|
|
7
|
+
.pieOuterCircle{
|
|
8
|
+
stroke: ${options.pieOuterStrokeColor};
|
|
9
|
+
stroke-width: ${options.pieOuterStrokeWidth};
|
|
10
|
+
fill: none;
|
|
11
|
+
}
|
|
12
|
+
.pieTitleText {
|
|
13
|
+
text-anchor: middle;
|
|
14
|
+
font-size: ${options.pieTitleTextSize};
|
|
15
|
+
fill: ${options.pieTitleTextColor};
|
|
16
|
+
font-family: ${options.fontFamily};
|
|
17
|
+
}
|
|
18
|
+
.slice {
|
|
19
|
+
font-family: ${options.fontFamily};
|
|
20
|
+
fill: ${options.pieSectionTextColor};
|
|
21
|
+
font-size:${options.pieSectionTextSize};
|
|
22
|
+
// fill: white;
|
|
23
|
+
}
|
|
24
|
+
.legend text {
|
|
25
|
+
fill: ${options.pieLegendTextColor};
|
|
26
|
+
font-family: ${options.fontFamily};
|
|
27
|
+
font-size: ${options.pieLegendTextSize};
|
|
28
|
+
}
|
|
29
|
+
`,"getStyles"),pieStyles_default=getStyles,createPieArcs=__name(sections2=>{const sum=[...sections2.values()].reduce((acc,val)=>acc+val,0),pieData=[...sections2.entries()].map(([label,value])=>({label,value})).filter(d=>d.value/sum*100>=1);return d3pie().value(d=>d.value).sort(null)(pieData)},"createPieArcs"),draw=__name((text,id,_version,diagObj)=>{var _a;log.debug(`rendering pie chart
|
|
30
|
+
`+text);const db2=diagObj.db,globalConfig=getConfig2$1(),pieConfig=cleanAndMerge(db2.getConfig(),globalConfig.pie),MARGIN=40,LEGEND_RECT_SIZE=18,LEGEND_SPACING=4,height=450,pieWidth=height,svg=selectSvgElement(id),group=svg.append("g");group.attr("transform","translate("+pieWidth/2+","+height/2+")");const{themeVariables}=globalConfig;let[outerStrokeWidth]=parseFontSize(themeVariables.pieOuterStrokeWidth);outerStrokeWidth??(outerStrokeWidth=2);const textPosition=pieConfig.textPosition,radius=Math.min(pieWidth,height)/2-MARGIN,arcGenerator=d3arc().innerRadius(0).outerRadius(radius),labelArcGenerator=d3arc().innerRadius(radius*textPosition).outerRadius(radius*textPosition);group.append("circle").attr("cx",0).attr("cy",0).attr("r",radius+outerStrokeWidth/2).attr("class","pieOuterCircle");const sections2=db2.getSections(),arcs=createPieArcs(sections2),myGeneratedColors=[themeVariables.pie1,themeVariables.pie2,themeVariables.pie3,themeVariables.pie4,themeVariables.pie5,themeVariables.pie6,themeVariables.pie7,themeVariables.pie8,themeVariables.pie9,themeVariables.pie10,themeVariables.pie11,themeVariables.pie12];let sum=0;sections2.forEach(section=>{sum+=section});const filteredArcs=arcs.filter(datum=>(datum.data.value/sum*100).toFixed(0)!=="0"),color=ordinal(myGeneratedColors).domain([...sections2.keys()]);group.selectAll("mySlices").data(filteredArcs).enter().append("path").attr("d",arcGenerator).attr("fill",datum=>color(datum.data.label)).attr("class","pieCircle"),group.selectAll("mySlices").data(filteredArcs).enter().append("text").text(datum=>(datum.data.value/sum*100).toFixed(0)+"%").attr("transform",datum=>"translate("+labelArcGenerator.centroid(datum)+")").style("text-anchor","middle").attr("class","slice");const titleText=group.append("text").text(db2.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText"),allSectionData=[...sections2.entries()].map(([label,value])=>({label,value})),legend=group.selectAll(".legend").data(allSectionData).enter().append("g").attr("class","legend").attr("transform",(_datum,index)=>{const height2=LEGEND_RECT_SIZE+LEGEND_SPACING,offset=height2*allSectionData.length/2,horizontal=12*LEGEND_RECT_SIZE,vertical=index*height2-offset;return"translate("+horizontal+","+vertical+")"});legend.append("rect").attr("width",LEGEND_RECT_SIZE).attr("height",LEGEND_RECT_SIZE).style("fill",d=>color(d.label)).style("stroke",d=>color(d.label)),legend.append("text").attr("x",LEGEND_RECT_SIZE+LEGEND_SPACING).attr("y",LEGEND_RECT_SIZE-LEGEND_SPACING).text(d=>db2.getShowData()?`${d.label} [${d.value}]`:d.label);const longestTextWidth=Math.max(...legend.selectAll("text").nodes().map(node=>(node==null?void 0:node.getBoundingClientRect().width)??0)),chartAndLegendWidth=pieWidth+MARGIN+LEGEND_RECT_SIZE+LEGEND_SPACING+longestTextWidth,titleWidth=((_a=titleText.node())==null?void 0:_a.getBoundingClientRect().width)??0,titleLeft=pieWidth/2-titleWidth/2,titleRight=pieWidth/2+titleWidth/2,viewBoxX=Math.min(0,titleLeft),totalWidth=Math.max(chartAndLegendWidth,titleRight)-viewBoxX;svg.attr("viewBox",`${viewBoxX} 0 ${totalWidth} ${height}`),configureSvgSize(svg,height,totalWidth,pieConfig.useMaxWidth)},"draw"),renderer={draw},diagram={parser,db,renderer,styles:pieStyles_default};export{diagram};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import{s as setAccDescription,g as getAccDescription,q as getDiagramTitle,p as setDiagramTitle,a as getAccTitle,b as setAccTitle,_ as __name,c as getConfig2,l as log,d as select,e as configureSvgSize,y as clear,F as defaultConfig_default,i as sanitizeText,I as getThemeVariables3}from"./mermaid.core-DNvsWVDx.js";import{l as linear}from"./linear-tWlC-NXc.js";import"./index-DJ0iGKLy.js";import"./vendor-codemirror-DxvDOrio.js";import"./vendor-antd-Dk5s46Ag.js";import"./vendor-markdown-DO-Ppp4f.js";import"./init-C7FSzFHJ.js";import"./defaultLocale-CcTwRAjA.js";var parser=(function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,3],$V1=[1,4],$V2=[1,5],$V3=[1,6],$V4=[1,7],$V5=[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],$V6=[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],$V7=[55,56,57],$V8=[2,36],$V9=[1,37],$Va=[1,36],$Vb=[1,38],$Vc=[1,35],$Vd=[1,43],$Ve=[1,41],$Vf=[1,14],$Vg=[1,23],$Vh=[1,18],$Vi=[1,19],$Vj=[1,20],$Vk=[1,21],$Vl=[1,22],$Vm=[1,24],$Vn=[1,25],$Vo=[1,26],$Vp=[1,27],$Vq=[1,28],$Vr=[1,29],$Vs=[1,32],$Vt=[1,33],$Vu=[1,34],$Vv=[1,39],$Vw=[1,40],$Vx=[1,42],$Vy=[1,44],$Vz=[1,62],$VA=[1,61],$VB=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],$VC=[1,65],$VD=[1,66],$VE=[1,67],$VF=[1,68],$VG=[1,69],$VH=[1,70],$VI=[1,71],$VJ=[1,72],$VK=[1,73],$VL=[1,74],$VM=[1,75],$VN=[1,76],$VO=[4,5,6,7,8,9,10,11,12,13,14,15,18],$VP=[1,90],$VQ=[1,91],$VR=[1,92],$VS=[1,99],$VT=[1,93],$VU=[1,96],$VV=[1,94],$VW=[1,95],$VX=[1,97],$VY=[1,98],$VZ=[1,102],$V_=[10,55,56,57],$V$=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],parser2={trace:__name(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:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 23:this.$=$$[$0];break;case 24:this.$=$$[$0-1]+""+$$[$0];break;case 26:this.$=$$[$0-1]+$$[$0];break;case 27:this.$=[$$[$0].trim()];break;case 28:$$[$0-2].push($$[$0].trim()),this.$=$$[$0-2];break;case 29:this.$=$$[$0-4],yy.addClass($$[$0-2],$$[$0]);break;case 37:this.$=[];break;case 42:this.$=$$[$0].trim(),yy.setDiagramTitle(this.$);break;case 43:this.$=$$[$0].trim(),yy.setAccTitle(this.$);break;case 44:case 45:this.$=$$[$0].trim(),yy.setAccDescription(this.$);break;case 46:yy.addSection($$[$0].substr(8)),this.$=$$[$0].substr(8);break;case 47:yy.addPoint($$[$0-3],"",$$[$0-1],$$[$0],[]);break;case 48:yy.addPoint($$[$0-4],$$[$0-3],$$[$0-1],$$[$0],[]);break;case 49:yy.addPoint($$[$0-4],"",$$[$0-2],$$[$0-1],$$[$0]);break;case 50:yy.addPoint($$[$0-5],$$[$0-4],$$[$0-2],$$[$0-1],$$[$0]);break;case 51:yy.setXAxisLeftText($$[$0-2]),yy.setXAxisRightText($$[$0]);break;case 52:$$[$0-1].text+=" ⟶ ",yy.setXAxisLeftText($$[$0-1]);break;case 53:yy.setXAxisLeftText($$[$0]);break;case 54:yy.setYAxisBottomText($$[$0-2]),yy.setYAxisTopText($$[$0]);break;case 55:$$[$0-1].text+=" ⟶ ",yy.setYAxisBottomText($$[$0-1]);break;case 56:yy.setYAxisBottomText($$[$0]);break;case 57:yy.setQuadrant1Text($$[$0]);break;case 58:yy.setQuadrant2Text($$[$0]);break;case 59:yy.setQuadrant3Text($$[$0]);break;case 60:yy.setQuadrant4Text($$[$0]);break;case 64:this.$={text:$$[$0],type:"text"};break;case 65:this.$={text:$$[$0-1].text+""+$$[$0],type:$$[$0-1].type};break;case 66:this.$={text:$$[$0],type:"text"};break;case 67:this.$={text:$$[$0],type:"markdown"};break;case 68:this.$=$$[$0];break;case 69:this.$=$$[$0-1]+""+$$[$0];break}},"anonymous"),table:[{18:$V0,26:1,27:2,28:$V1,55:$V2,56:$V3,57:$V4},{1:[3]},{18:$V0,26:8,27:2,28:$V1,55:$V2,56:$V3,57:$V4},{18:$V0,26:9,27:2,28:$V1,55:$V2,56:$V3,57:$V4},o($V5,[2,33],{29:10}),o($V6,[2,61]),o($V6,[2,62]),o($V6,[2,63]),{1:[2,30]},{1:[2,31]},o($V7,$V8,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$Vf,25:$Vg,35:$Vh,37:$Vi,39:$Vj,41:$Vk,42:$Vl,48:$Vm,50:$Vn,51:$Vo,52:$Vp,53:$Vq,54:$Vr,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V5,[2,34]),{27:45,55:$V2,56:$V3,57:$V4},o($V7,[2,37]),o($V7,$V8,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$Vf,25:$Vg,35:$Vh,37:$Vi,39:$Vj,41:$Vk,42:$Vl,48:$Vm,50:$Vn,51:$Vo,52:$Vp,53:$Vq,54:$Vr,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,39]),o($V7,[2,40]),o($V7,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},o($V7,[2,45]),o($V7,[2,46]),{18:[1,50]},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:51,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:52,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:53,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:54,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:55,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,43:56,58:31,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},{4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,44:[1,57],47:[1,58],58:60,59:59,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy},o($VB,[2,64]),o($VB,[2,66]),o($VB,[2,67]),o($VB,[2,70]),o($VB,[2,71]),o($VB,[2,72]),o($VB,[2,73]),o($VB,[2,74]),o($VB,[2,75]),o($VB,[2,76]),o($VB,[2,77]),o($VB,[2,78]),o($VB,[2,79]),o($VB,[2,80]),o($V5,[2,35]),o($V7,[2,38]),o($V7,[2,42]),o($V7,[2,43]),o($V7,[2,44]),{3:64,4:$VC,5:$VD,6:$VE,7:$VF,8:$VG,9:$VH,10:$VI,11:$VJ,12:$VK,13:$VL,14:$VM,15:$VN,21:63},o($V7,[2,53],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,49:[1,77],63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,56],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,49:[1,78],63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,57],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,58],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,59],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,60],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),{45:[1,79]},{44:[1,80]},o($VB,[2,65]),o($VB,[2,81]),o($VB,[2,82]),o($VB,[2,83]),{3:82,4:$VC,5:$VD,6:$VE,7:$VF,8:$VG,9:$VH,10:$VI,11:$VJ,12:$VK,13:$VL,14:$VM,15:$VN,18:[1,81]},o($VO,[2,23]),o($VO,[2,1]),o($VO,[2,2]),o($VO,[2,3]),o($VO,[2,4]),o($VO,[2,5]),o($VO,[2,6]),o($VO,[2,7]),o($VO,[2,8]),o($VO,[2,9]),o($VO,[2,10]),o($VO,[2,11]),o($VO,[2,12]),o($V7,[2,52],{58:31,43:83,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,55],{58:31,43:84,4:$V9,5:$Va,10:$Vb,12:$Vc,13:$Vd,14:$Ve,60:$Vs,61:$Vt,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),{46:[1,85]},{45:[1,86]},{4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,16:89,17:$VV,18:$VW,19:$VX,20:$VY,22:88,23:87},o($VO,[2,24]),o($V7,[2,51],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,54],{59:59,58:60,4:$V9,5:$Va,8:$Vz,10:$Vb,12:$Vc,13:$Vd,14:$Ve,18:$VA,63:$Vu,64:$Vv,65:$Vw,66:$Vx,67:$Vy}),o($V7,[2,47],{22:88,16:89,23:100,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),{46:[1,101]},o($V7,[2,29],{10:$VZ}),o($V_,[2,27],{16:103,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),o($V$,[2,25]),o($V$,[2,13]),o($V$,[2,14]),o($V$,[2,15]),o($V$,[2,16]),o($V$,[2,17]),o($V$,[2,18]),o($V$,[2,19]),o($V$,[2,20]),o($V$,[2,21]),o($V$,[2,22]),o($V7,[2,49],{10:$VZ}),o($V7,[2,48],{22:88,16:89,23:104,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY}),{4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,16:89,17:$VV,18:$VW,19:$VX,20:$VY,22:105},o($V$,[2,26]),o($V7,[2,50],{10:$VZ}),o($V_,[2,28],{16:103,4:$VP,5:$VQ,6:$VR,8:$VS,11:$VT,13:$VU,17:$VV,18:$VW,19:$VX,20:$VY})],defaultActions:{8:[2,30],9:[2,31]},parseError:__name(function(str,hash){if(hash.recoverable)this.trace(str);else{var error=new Error(str);throw error.hash=hash,error}},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,TERROR=2,EOF=1,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,typeof lexer2.yylloc>"u"&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;typeof sharedState.yy.parseError=="function"?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function popStack(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n}__name(popStack,"popStack");function lex(){var token;return token=tstack.pop()||lexer2.lex()||EOF,typeof token!="number"&&(token instanceof Array&&(tstack=token,token=tstack.pop()),token=self.symbols_[token]||token),token}__name(lex,"lex");for(var symbol,state,action,r,yyval={},p,len,newState,expected;;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:((symbol===null||typeof symbol>"u")&&(symbol=lex()),action=table[state]&&table[state][symbol]),typeof action>"u"||!action.length||!action[0]){var errStr="";expected=[];for(p in table[state])this.terminals_[p]&&p>TERROR&&expected.push("'"+this.terminals_[p]+"'");lexer2.showPosition?errStr="Parse error on line "+(yylineno+1)+`:
|
|
2
|
+
`+lexer2.showPosition()+`
|
|
3
|
+
Expecting `+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":errStr="Parse error on line "+(yylineno+1)+": Unexpected "+(symbol==EOF?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args)),typeof r<"u")return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=(function(){var lexer2={EOF:1,parseError:__name(function(str,hash){if(this.yy.parser)this.yy.parser.parseError(str,hash);else throw new Error(str)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,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:__name(function(){var ch=this._input[0];this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch;var lines=ch.match(/(?:\r\n?|\n).*/g);return lines?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=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),lines.length-1&&(this.yylineno-=lines.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:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+`
|
|
5
|
+
`+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={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&&(backup.yylloc.range=this.yylloc.range.slice(0))),lines=match[0].match(/(?:\r\n?|\n).*/g),lines&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,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(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var token,match,tempMatch,index;this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if(tempMatch=this._input.match(this.rules[rules[i]]),tempMatch&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(token=this.test_match(tempMatch,rules[i]),token!==!1)return token;if(this._backtrack){match=!1;continue}else return!1}else if(!this.options.flex)break}return match?(token=this.test_match(match,rules[index]),token!==!1?token:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(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:__name(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:break;case 1:break;case 2:return 55;case 3:break;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: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 23:this.popState();break;case 24:this.begin("string");break;case 25:this.popState();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 31:this.popState();break;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:return 65;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}}};return lexer2})();parser2.lexer=lexer;function Parser(){this.yy={}}return __name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser})();parser.parser=parser;var quadrant_default=parser,defaultThemeVariables=getThemeVariables3(),_a,QuadrantBuilder=(_a=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 _a3,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:((_a3=defaultConfig_default.quadrantChart)==null?void 0:_a3.chartWidth)||500,chartWidth:((_b=defaultConfig_default.quadrantChart)==null?void 0:_b.chartHeight)||500,titlePadding:((_c=defaultConfig_default.quadrantChart)==null?void 0:_c.titlePadding)||10,titleFontSize:((_d=defaultConfig_default.quadrantChart)==null?void 0:_d.titleFontSize)||20,quadrantPadding:((_e=defaultConfig_default.quadrantChart)==null?void 0:_e.quadrantPadding)||5,xAxisLabelPadding:((_f=defaultConfig_default.quadrantChart)==null?void 0:_f.xAxisLabelPadding)||5,yAxisLabelPadding:((_g=defaultConfig_default.quadrantChart)==null?void 0:_g.yAxisLabelPadding)||5,xAxisLabelFontSize:((_h=defaultConfig_default.quadrantChart)==null?void 0:_h.xAxisLabelFontSize)||16,yAxisLabelFontSize:((_i=defaultConfig_default.quadrantChart)==null?void 0:_i.yAxisLabelFontSize)||16,quadrantLabelFontSize:((_j=defaultConfig_default.quadrantChart)==null?void 0:_j.quadrantLabelFontSize)||16,quadrantTextTopPadding:((_k=defaultConfig_default.quadrantChart)==null?void 0:_k.quadrantTextTopPadding)||5,pointTextPadding:((_l=defaultConfig_default.quadrantChart)==null?void 0:_l.pointTextPadding)||5,pointLabelFontSize:((_m=defaultConfig_default.quadrantChart)==null?void 0:_m.pointLabelFontSize)||12,pointRadius:((_n=defaultConfig_default.quadrantChart)==null?void 0:_n.pointRadius)||5,xAxisPosition:((_o=defaultConfig_default.quadrantChart)==null?void 0:_o.xAxisPosition)||"top",yAxisPosition:((_p=defaultConfig_default.quadrantChart)==null?void 0:_p.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:((_q=defaultConfig_default.quadrantChart)==null?void 0:_q.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:((_r=defaultConfig_default.quadrantChart)==null?void 0:_r.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:defaultThemeVariables.quadrant1Fill,quadrant2Fill:defaultThemeVariables.quadrant2Fill,quadrant3Fill:defaultThemeVariables.quadrant3Fill,quadrant4Fill:defaultThemeVariables.quadrant4Fill,quadrant1TextFill:defaultThemeVariables.quadrant1TextFill,quadrant2TextFill:defaultThemeVariables.quadrant2TextFill,quadrant3TextFill:defaultThemeVariables.quadrant3TextFill,quadrant4TextFill:defaultThemeVariables.quadrant4TextFill,quadrantPointFill:defaultThemeVariables.quadrantPointFill,quadrantPointTextFill:defaultThemeVariables.quadrantPointTextFill,quadrantXAxisTextFill:defaultThemeVariables.quadrantXAxisTextFill,quadrantYAxisTextFill:defaultThemeVariables.quadrantYAxisTextFill,quadrantTitleFill:defaultThemeVariables.quadrantTitleFill,quadrantInternalBorderStrokeFill:defaultThemeVariables.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:defaultThemeVariables.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,log.info("clear called")}setData(data){this.data={...this.data,...data}}addPoints(points){this.data.points=[...points,...this.data.points]}addClass(className,styles){this.classes.set(className,styles)}setConfig(config2){log.trace("setConfig called with: ",config2),this.config={...this.config,...config2}}setThemeConfig(themeConfig){log.trace("setThemeConfig called with: ",themeConfig),this.themeConfig={...this.themeConfig,...themeConfig}}calculateSpace(xAxisPosition,showXAxis,showYAxis,showTitle){const xAxisSpaceCalculation=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,xAxisSpace={top:xAxisPosition==="top"&&showXAxis?xAxisSpaceCalculation:0,bottom:xAxisPosition==="bottom"&&showXAxis?xAxisSpaceCalculation:0},yAxisSpaceCalculation=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,yAxisSpace={left:this.config.yAxisPosition==="left"&&showYAxis?yAxisSpaceCalculation:0,right:this.config.yAxisPosition==="right"&&showYAxis?yAxisSpaceCalculation:0},titleSpaceCalculation=this.config.titleFontSize+this.config.titlePadding*2,titleSpace={top:showTitle?titleSpaceCalculation:0},quadrantLeft=this.config.quadrantPadding+yAxisSpace.left,quadrantTop=this.config.quadrantPadding+xAxisSpace.top+titleSpace.top,quadrantWidth=this.config.chartWidth-this.config.quadrantPadding*2-yAxisSpace.left-yAxisSpace.right,quadrantHeight=this.config.chartHeight-this.config.quadrantPadding*2-xAxisSpace.top-xAxisSpace.bottom-titleSpace.top,quadrantHalfWidth=quadrantWidth/2,quadrantHalfHeight=quadrantHeight/2;return{xAxisSpace,yAxisSpace,titleSpace,quadrantSpace:{quadrantLeft,quadrantTop,quadrantWidth,quadrantHalfWidth,quadrantHeight,quadrantHalfHeight}}}getAxisLabels(xAxisPosition,showXAxis,showYAxis,spaceData){const{quadrantSpace,titleSpace}=spaceData,{quadrantHalfHeight,quadrantHeight,quadrantLeft,quadrantHalfWidth,quadrantTop,quadrantWidth}=quadrantSpace,drawXAxisLabelsInMiddle=!!this.data.xAxisRightText,drawYAxisLabelsInMiddle=!!this.data.yAxisTopText,axisLabels=[];return this.data.xAxisLeftText&&showXAxis&&axisLabels.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:quadrantLeft+(drawXAxisLabelsInMiddle?quadrantHalfWidth/2:0),y:xAxisPosition==="top"?this.config.xAxisLabelPadding+titleSpace.top:this.config.xAxisLabelPadding+quadrantTop+quadrantHeight+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:drawXAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&showXAxis&&axisLabels.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:quadrantLeft+quadrantHalfWidth+(drawXAxisLabelsInMiddle?quadrantHalfWidth/2:0),y:xAxisPosition==="top"?this.config.xAxisLabelPadding+titleSpace.top:this.config.xAxisLabelPadding+quadrantTop+quadrantHeight+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:drawXAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&showYAxis&&axisLabels.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+quadrantLeft+quadrantWidth+this.config.quadrantPadding,y:quadrantTop+quadrantHeight-(drawYAxisLabelsInMiddle?quadrantHalfHeight/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:drawYAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&showYAxis&&axisLabels.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition==="left"?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+quadrantLeft+quadrantWidth+this.config.quadrantPadding,y:quadrantTop+quadrantHalfHeight-(drawYAxisLabelsInMiddle?quadrantHalfHeight/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:drawYAxisLabelsInMiddle?"center":"left",horizontalPos:"top",rotation:-90}),axisLabels}getQuadrants(spaceData){const{quadrantSpace}=spaceData,{quadrantHalfHeight,quadrantLeft,quadrantHalfWidth,quadrantTop}=quadrantSpace,quadrants=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:quadrantLeft+quadrantHalfWidth,y:quadrantTop,width:quadrantHalfWidth,height:quadrantHalfHeight,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:quadrantLeft,y:quadrantTop,width:quadrantHalfWidth,height:quadrantHalfHeight,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:quadrantLeft,y:quadrantTop+quadrantHalfHeight,width:quadrantHalfWidth,height:quadrantHalfHeight,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:quadrantLeft+quadrantHalfWidth,y:quadrantTop+quadrantHalfHeight,width:quadrantHalfWidth,height:quadrantHalfHeight,fill:this.themeConfig.quadrant4Fill}];for(const quadrant of quadrants)quadrant.text.x=quadrant.x+quadrant.width/2,this.data.points.length===0?(quadrant.text.y=quadrant.y+quadrant.height/2,quadrant.text.horizontalPos="middle"):(quadrant.text.y=quadrant.y+this.config.quadrantTextTopPadding,quadrant.text.horizontalPos="top");return quadrants}getQuadrantPoints(spaceData){const{quadrantSpace}=spaceData,{quadrantHeight,quadrantLeft,quadrantTop,quadrantWidth}=quadrantSpace,xAxis=linear().domain([0,1]).range([quadrantLeft,quadrantWidth+quadrantLeft]),yAxis=linear().domain([0,1]).range([quadrantHeight+quadrantTop,quadrantTop]);return this.data.points.map(point=>{const classStyles=this.classes.get(point.className);return classStyles&&(point={...classStyles,...point}),{x:xAxis(point.x),y:yAxis(point.y),fill:point.color??this.themeConfig.quadrantPointFill,radius:point.radius??this.config.pointRadius,text:{text:point.text,fill:this.themeConfig.quadrantPointTextFill,x:xAxis(point.x),y:yAxis(point.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:point.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:point.strokeWidth??"0px"}})}getBorders(spaceData){const halfExternalBorderWidth=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace}=spaceData,{quadrantHalfHeight,quadrantHeight,quadrantLeft,quadrantHalfWidth,quadrantTop,quadrantWidth}=quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft-halfExternalBorderWidth,y1:quadrantTop,x2:quadrantLeft+quadrantWidth+halfExternalBorderWidth,y2:quadrantTop},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft+quadrantWidth,y1:quadrantTop+halfExternalBorderWidth,x2:quadrantLeft+quadrantWidth,y2:quadrantTop+quadrantHeight-halfExternalBorderWidth},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft-halfExternalBorderWidth,y1:quadrantTop+quadrantHeight,x2:quadrantLeft+quadrantWidth+halfExternalBorderWidth,y2:quadrantTop+quadrantHeight},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:quadrantLeft,y1:quadrantTop+halfExternalBorderWidth,x2:quadrantLeft,y2:quadrantTop+quadrantHeight-halfExternalBorderWidth},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:quadrantLeft+quadrantHalfWidth,y1:quadrantTop+halfExternalBorderWidth,x2:quadrantLeft+quadrantHalfWidth,y2:quadrantTop+quadrantHeight-halfExternalBorderWidth},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:quadrantLeft+halfExternalBorderWidth,y1:quadrantTop+quadrantHalfHeight,x2:quadrantLeft+quadrantWidth-halfExternalBorderWidth,y2:quadrantTop+quadrantHalfHeight}]}getTitle(showTitle){if(showTitle)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 showXAxis=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),showYAxis=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),showTitle=this.config.showTitle&&!!this.data.titleText,xAxisPosition=this.data.points.length>0?"bottom":this.config.xAxisPosition,calculatedSpace=this.calculateSpace(xAxisPosition,showXAxis,showYAxis,showTitle);return{points:this.getQuadrantPoints(calculatedSpace),quadrants:this.getQuadrants(calculatedSpace),axisLabels:this.getAxisLabels(xAxisPosition,showXAxis,showYAxis,calculatedSpace),borderLines:this.getBorders(calculatedSpace),title:this.getTitle(showTitle)}}},__name(_a,"QuadrantBuilder"),_a),_a2,InvalidStyleError=(_a2=class extends Error{constructor(style,value,type){super(`value for ${style} ${value} is invalid, please use a valid ${type}`),this.name="InvalidStyleError"}},__name(_a2,"InvalidStyleError"),_a2);function validateHexCode(value){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(value)}__name(validateHexCode,"validateHexCode");function validateNumber(value){return!/^\d+$/.test(value)}__name(validateNumber,"validateNumber");function validateSizeInPixels(value){return!/^\d+px$/.test(value)}__name(validateSizeInPixels,"validateSizeInPixels");var config=getConfig2();function textSanitizer(text){return sanitizeText(text.trim(),config)}__name(textSanitizer,"textSanitizer");var quadrantBuilder=new QuadrantBuilder;function setQuadrant1Text(textObj){quadrantBuilder.setData({quadrant1Text:textSanitizer(textObj.text)})}__name(setQuadrant1Text,"setQuadrant1Text");function setQuadrant2Text(textObj){quadrantBuilder.setData({quadrant2Text:textSanitizer(textObj.text)})}__name(setQuadrant2Text,"setQuadrant2Text");function setQuadrant3Text(textObj){quadrantBuilder.setData({quadrant3Text:textSanitizer(textObj.text)})}__name(setQuadrant3Text,"setQuadrant3Text");function setQuadrant4Text(textObj){quadrantBuilder.setData({quadrant4Text:textSanitizer(textObj.text)})}__name(setQuadrant4Text,"setQuadrant4Text");function setXAxisLeftText(textObj){quadrantBuilder.setData({xAxisLeftText:textSanitizer(textObj.text)})}__name(setXAxisLeftText,"setXAxisLeftText");function setXAxisRightText(textObj){quadrantBuilder.setData({xAxisRightText:textSanitizer(textObj.text)})}__name(setXAxisRightText,"setXAxisRightText");function setYAxisTopText(textObj){quadrantBuilder.setData({yAxisTopText:textSanitizer(textObj.text)})}__name(setYAxisTopText,"setYAxisTopText");function setYAxisBottomText(textObj){quadrantBuilder.setData({yAxisBottomText:textSanitizer(textObj.text)})}__name(setYAxisBottomText,"setYAxisBottomText");function parseStyles(styles){const stylesObject={};for(const style of styles){const[key,value]=style.trim().split(/\s*:\s*/);if(key==="radius"){if(validateNumber(value))throw new InvalidStyleError(key,value,"number");stylesObject.radius=parseInt(value)}else if(key==="color"){if(validateHexCode(value))throw new InvalidStyleError(key,value,"hex code");stylesObject.color=value}else if(key==="stroke-color"){if(validateHexCode(value))throw new InvalidStyleError(key,value,"hex code");stylesObject.strokeColor=value}else if(key==="stroke-width"){if(validateSizeInPixels(value))throw new InvalidStyleError(key,value,"number of pixels (eg. 10px)");stylesObject.strokeWidth=value}else throw new Error(`style named ${key} is not supported.`)}return stylesObject}__name(parseStyles,"parseStyles");function addPoint(textObj,className,x,y,styles){const stylesObject=parseStyles(styles);quadrantBuilder.addPoints([{x,y,text:textSanitizer(textObj.text),className,...stylesObject}])}__name(addPoint,"addPoint");function addClass(className,styles){quadrantBuilder.addClass(className,parseStyles(styles))}__name(addClass,"addClass");function setWidth(width){quadrantBuilder.setConfig({chartWidth:width})}__name(setWidth,"setWidth");function setHeight(height){quadrantBuilder.setConfig({chartHeight:height})}__name(setHeight,"setHeight");function getQuadrantData(){const config2=getConfig2(),{themeVariables,quadrantChart:quadrantChartConfig}=config2;return quadrantChartConfig&&quadrantBuilder.setConfig(quadrantChartConfig),quadrantBuilder.setThemeConfig({quadrant1Fill:themeVariables.quadrant1Fill,quadrant2Fill:themeVariables.quadrant2Fill,quadrant3Fill:themeVariables.quadrant3Fill,quadrant4Fill:themeVariables.quadrant4Fill,quadrant1TextFill:themeVariables.quadrant1TextFill,quadrant2TextFill:themeVariables.quadrant2TextFill,quadrant3TextFill:themeVariables.quadrant3TextFill,quadrant4TextFill:themeVariables.quadrant4TextFill,quadrantPointFill:themeVariables.quadrantPointFill,quadrantPointTextFill:themeVariables.quadrantPointTextFill,quadrantXAxisTextFill:themeVariables.quadrantXAxisTextFill,quadrantYAxisTextFill:themeVariables.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:themeVariables.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:themeVariables.quadrantInternalBorderStrokeFill,quadrantTitleFill:themeVariables.quadrantTitleFill}),quadrantBuilder.setData({titleText:getDiagramTitle()}),quadrantBuilder.build()}__name(getQuadrantData,"getQuadrantData");var clear2=__name(function(){quadrantBuilder.clear(),clear()},"clear"),quadrantDb_default={setWidth,setHeight,setQuadrant1Text,setQuadrant2Text,setQuadrant3Text,setQuadrant4Text,setXAxisLeftText,setXAxisRightText,setYAxisTopText,setYAxisBottomText,parseStyles,addPoint,addClass,getQuadrantData,clear:clear2,setAccTitle,getAccTitle,setDiagramTitle,getDiagramTitle,getAccDescription,setAccDescription},draw=__name((txt,id,_version,diagObj)=>{var _a3,_b,_c;function getDominantBaseLine(horizontalPos){return horizontalPos==="top"?"hanging":"middle"}__name(getDominantBaseLine,"getDominantBaseLine");function getTextAnchor(verticalPos){return verticalPos==="left"?"start":"middle"}__name(getTextAnchor,"getTextAnchor");function getTransformation(data){return`translate(${data.x}, ${data.y}) rotate(${data.rotation||0})`}__name(getTransformation,"getTransformation");const conf=getConfig2();log.debug(`Rendering quadrant chart
|
|
7
|
+
`+txt);const securityLevel=conf.securityLevel;let sandboxElement;securityLevel==="sandbox"&&(sandboxElement=select("#i"+id));const svg=(securityLevel==="sandbox"?select(sandboxElement.nodes()[0].contentDocument.body):select("body")).select(`[id="${id}"]`),group=svg.append("g").attr("class","main"),width=((_a3=conf.quadrantChart)==null?void 0:_a3.chartWidth)??500,height=((_b=conf.quadrantChart)==null?void 0:_b.chartHeight)??500;configureSvgSize(svg,height,width,((_c=conf.quadrantChart)==null?void 0:_c.useMaxWidth)??!0),svg.attr("viewBox","0 0 "+width+" "+height),diagObj.db.setHeight(height),diagObj.db.setWidth(width);const quadrantData=diagObj.db.getQuadrantData(),quadrantsGroup=group.append("g").attr("class","quadrants"),borderGroup=group.append("g").attr("class","border"),dataPointGroup=group.append("g").attr("class","data-points"),labelGroup=group.append("g").attr("class","labels"),titleGroup=group.append("g").attr("class","title");quadrantData.title&&titleGroup.append("text").attr("x",0).attr("y",0).attr("fill",quadrantData.title.fill).attr("font-size",quadrantData.title.fontSize).attr("dominant-baseline",getDominantBaseLine(quadrantData.title.horizontalPos)).attr("text-anchor",getTextAnchor(quadrantData.title.verticalPos)).attr("transform",getTransformation(quadrantData.title)).text(quadrantData.title.text),quadrantData.borderLines&&borderGroup.selectAll("line").data(quadrantData.borderLines).enter().append("line").attr("x1",data=>data.x1).attr("y1",data=>data.y1).attr("x2",data=>data.x2).attr("y2",data=>data.y2).style("stroke",data=>data.strokeFill).style("stroke-width",data=>data.strokeWidth);const quadrants=quadrantsGroup.selectAll("g.quadrant").data(quadrantData.quadrants).enter().append("g").attr("class","quadrant");quadrants.append("rect").attr("x",data=>data.x).attr("y",data=>data.y).attr("width",data=>data.width).attr("height",data=>data.height).attr("fill",data=>data.fill),quadrants.append("text").attr("x",0).attr("y",0).attr("fill",data=>data.text.fill).attr("font-size",data=>data.text.fontSize).attr("dominant-baseline",data=>getDominantBaseLine(data.text.horizontalPos)).attr("text-anchor",data=>getTextAnchor(data.text.verticalPos)).attr("transform",data=>getTransformation(data.text)).text(data=>data.text.text),labelGroup.selectAll("g.label").data(quadrantData.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(data=>data.text).attr("fill",data=>data.fill).attr("font-size",data=>data.fontSize).attr("dominant-baseline",data=>getDominantBaseLine(data.horizontalPos)).attr("text-anchor",data=>getTextAnchor(data.verticalPos)).attr("transform",data=>getTransformation(data));const dataPoints=dataPointGroup.selectAll("g.data-point").data(quadrantData.points).enter().append("g").attr("class","data-point");dataPoints.append("circle").attr("cx",data=>data.x).attr("cy",data=>data.y).attr("r",data=>data.radius).attr("fill",data=>data.fill).attr("stroke",data=>data.strokeColor).attr("stroke-width",data=>data.strokeWidth),dataPoints.append("text").attr("x",0).attr("y",0).text(data=>data.text.text).attr("fill",data=>data.text.fill).attr("font-size",data=>data.text.fontSize).attr("dominant-baseline",data=>getDominantBaseLine(data.text.horizontalPos)).attr("text-anchor",data=>getTextAnchor(data.text.verticalPos)).attr("transform",data=>getTransformation(data.text))},"draw"),quadrantRenderer_default={draw},diagram={parser:quadrant_default,db:quadrantDb_default,renderer:quadrantRenderer_default,styles:__name(()=>"","styles")};export{diagram};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import{g as getDiagramElement}from"./chunk-55IACEB6-DcgWxDD5.js";import{s as setupViewPortForSVG}from"./chunk-EDXVE4YY-DeUzWpQx.js";import{_ as __name,C as getConfig,b as setAccTitle,a as getAccTitle,s as setAccDescription,g as getAccDescription,p as setDiagramTitle,q as getDiagramTitle,c as getConfig2,l as log,y as clear,B as __export,o as getRegisteredLayoutAlgorithm,r as render,u as utils_default}from"./mermaid.core-DNvsWVDx.js";import"./index-DJ0iGKLy.js";import"./vendor-codemirror-DxvDOrio.js";import"./vendor-antd-Dk5s46Ag.js";import"./vendor-markdown-DO-Ppp4f.js";var parser=(function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,3],$V1=[1,4],$V2=[1,5],$V3=[1,6],$V4=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],$V5=[1,22],$V6=[2,7],$V7=[1,26],$V8=[1,27],$V9=[1,28],$Va=[1,29],$Vb=[1,33],$Vc=[1,34],$Vd=[1,35],$Ve=[1,36],$Vf=[1,37],$Vg=[1,38],$Vh=[1,24],$Vi=[1,31],$Vj=[1,32],$Vk=[1,30],$Vl=[1,39],$Vm=[1,40],$Vn=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],$Vo=[1,61],$Vp=[89,90],$Vq=[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],$Vr=[27,29],$Vs=[1,70],$Vt=[1,71],$Vu=[1,72],$Vv=[1,73],$Vw=[1,74],$Vx=[1,75],$Vy=[1,76],$Vz=[1,83],$VA=[1,80],$VB=[1,84],$VC=[1,85],$VD=[1,86],$VE=[1,87],$VF=[1,88],$VG=[1,89],$VH=[1,90],$VI=[1,91],$VJ=[1,92],$VK=[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],$VL=[63,64],$VM=[1,101],$VN=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],$VO=[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],$VP=[1,110],$VQ=[1,106],$VR=[1,107],$VS=[1,108],$VT=[1,109],$VU=[1,111],$VV=[1,116],$VW=[1,117],$VX=[1,114],$VY=[1,115],parser2={trace:__name(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:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 4:this.$=$$[$0].trim(),yy.setAccTitle(this.$);break;case 5:case 6:this.$=$$[$0].trim(),yy.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:yy.setDirection("TB");break;case 18:yy.setDirection("BT");break;case 19:yy.setDirection("RL");break;case 20:yy.setDirection("LR");break;case 21:yy.addRequirement($$[$0-3],$$[$0-4]);break;case 22:yy.addRequirement($$[$0-5],$$[$0-6]),yy.setClass([$$[$0-5]],$$[$0-3]);break;case 23:yy.setNewReqId($$[$0-2]);break;case 24:yy.setNewReqText($$[$0-2]);break;case 25:yy.setNewReqRisk($$[$0-2]);break;case 26:yy.setNewReqVerifyMethod($$[$0-2]);break;case 29:this.$=yy.RequirementType.REQUIREMENT;break;case 30:this.$=yy.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=yy.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=yy.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=yy.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=yy.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=yy.RiskLevel.LOW_RISK;break;case 36:this.$=yy.RiskLevel.MED_RISK;break;case 37:this.$=yy.RiskLevel.HIGH_RISK;break;case 38:this.$=yy.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=yy.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=yy.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=yy.VerifyType.VERIFY_TEST;break;case 42:yy.addElement($$[$0-3]);break;case 43:yy.addElement($$[$0-5]),yy.setClass([$$[$0-5]],$$[$0-3]);break;case 44:yy.setNewElementType($$[$0-2]);break;case 45:yy.setNewElementDocRef($$[$0-2]);break;case 48:yy.addRelationship($$[$0-2],$$[$0],$$[$0-4]);break;case 49:yy.addRelationship($$[$0-2],$$[$0-4],$$[$0]);break;case 50:this.$=yy.Relationships.CONTAINS;break;case 51:this.$=yy.Relationships.COPIES;break;case 52:this.$=yy.Relationships.DERIVES;break;case 53:this.$=yy.Relationships.SATISFIES;break;case 54:this.$=yy.Relationships.VERIFIES;break;case 55:this.$=yy.Relationships.REFINES;break;case 56:this.$=yy.Relationships.TRACES;break;case 57:this.$=$$[$0-2],yy.defineClass($$[$0-1],$$[$0]);break;case 58:yy.setClass($$[$0-1],$$[$0]);break;case 59:yy.setClass([$$[$0-2]],$$[$0]);break;case 60:case 62:this.$=[$$[$0]];break;case 61:case 63:this.$=$$[$0-2].concat([$$[$0]]);break;case 64:this.$=$$[$0-2],yy.setCssStyle($$[$0-1],$$[$0]);break;case 65:this.$=[$$[$0]];break;case 66:$$[$0-2].push($$[$0]),this.$=$$[$0-2];break;case 68:this.$=$$[$0-1]+$$[$0];break}},"anonymous"),table:[{3:1,4:2,6:$V0,9:$V1,11:$V2,13:$V3},{1:[3]},{3:8,4:2,5:[1,7],6:$V0,9:$V1,11:$V2,13:$V3},{5:[1,9]},{10:[1,10]},{12:[1,11]},o($V4,[2,6]),{3:12,4:2,6:$V0,9:$V1,11:$V2,13:$V3},{1:[2,2]},{4:17,5:$V5,7:13,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},o($V4,[2,4]),o($V4,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:$V5,7:42,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:43,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:44,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:45,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:46,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:47,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:48,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:49,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{4:17,5:$V5,7:50,8:$V6,9:$V1,11:$V2,13:$V3,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:$V7,22:$V8,23:$V9,24:$Va,25:23,33:25,41:$Vb,42:$Vc,43:$Vd,44:$Ve,45:$Vf,46:$Vg,54:$Vh,72:$Vi,74:$Vj,77:$Vk,89:$Vl,90:$Vm},{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]},o($Vn,[2,17]),o($Vn,[2,18]),o($Vn,[2,19]),o($Vn,[2,20]),{30:60,33:62,75:$Vo,89:$Vl,90:$Vm},{30:63,33:62,75:$Vo,89:$Vl,90:$Vm},{30:64,33:62,75:$Vo,89:$Vl,90:$Vm},o($Vp,[2,29]),o($Vp,[2,30]),o($Vp,[2,31]),o($Vp,[2,32]),o($Vp,[2,33]),o($Vp,[2,34]),o($Vq,[2,81]),o($Vq,[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]},o($Vr,[2,79]),o($Vr,[2,80]),{27:[1,67],29:[1,68]},o($Vr,[2,85]),o($Vr,[2,86]),{62:69,65:$Vs,66:$Vt,67:$Vu,68:$Vv,69:$Vw,70:$Vx,71:$Vy},{62:77,65:$Vs,66:$Vt,67:$Vu,68:$Vv,69:$Vw,70:$Vx,71:$Vy},{30:78,33:62,75:$Vo,89:$Vl,90:$Vm},{73:79,75:$Vz,76:$VA,78:81,79:82,80:$VB,81:$VC,82:$VD,83:$VE,84:$VF,85:$VG,86:$VH,87:$VI,88:$VJ},o($VK,[2,60]),o($VK,[2,62]),{73:93,75:$Vz,76:$VA,78:81,79:82,80:$VB,81:$VC,82:$VD,83:$VE,84:$VF,85:$VG,86:$VH,87:$VI,88:$VJ},{30:94,33:62,75:$Vo,76:$VA,89:$Vl,90:$Vm},{5:[1,95]},{30:96,33:62,75:$Vo,89:$Vl,90:$Vm},{5:[1,97]},{30:98,33:62,75:$Vo,89:$Vl,90:$Vm},{63:[1,99]},o($VL,[2,50]),o($VL,[2,51]),o($VL,[2,52]),o($VL,[2,53]),o($VL,[2,54]),o($VL,[2,55]),o($VL,[2,56]),{64:[1,100]},o($Vn,[2,59],{76:$VA}),o($Vn,[2,64],{76:$VM}),{33:103,75:[1,102],89:$Vl,90:$Vm},o($VN,[2,65],{79:104,75:$Vz,80:$VB,81:$VC,82:$VD,83:$VE,84:$VF,85:$VG,86:$VH,87:$VI,88:$VJ}),o($VO,[2,67]),o($VO,[2,69]),o($VO,[2,70]),o($VO,[2,71]),o($VO,[2,72]),o($VO,[2,73]),o($VO,[2,74]),o($VO,[2,75]),o($VO,[2,76]),o($VO,[2,77]),o($VO,[2,78]),o($Vn,[2,57],{76:$VM}),o($Vn,[2,58],{76:$VA}),{5:$VP,28:105,31:$VQ,34:$VR,36:$VS,38:$VT,40:$VU},{27:[1,112],76:$VA},{5:$VV,40:$VW,56:113,57:$VX,59:$VY},{27:[1,118],76:$VA},{33:119,89:$Vl,90:$Vm},{33:120,89:$Vl,90:$Vm},{75:$Vz,78:121,79:82,80:$VB,81:$VC,82:$VD,83:$VE,84:$VF,85:$VG,86:$VH,87:$VI,88:$VJ},o($VK,[2,61]),o($VK,[2,63]),o($VO,[2,68]),o($Vn,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:$VP,28:126,31:$VQ,34:$VR,36:$VS,38:$VT,40:$VU},o($Vn,[2,28]),{5:[1,127]},o($Vn,[2,42]),{32:[1,128]},{32:[1,129]},{5:$VV,40:$VW,56:130,57:$VX,59:$VY},o($Vn,[2,47]),{5:[1,131]},o($Vn,[2,48]),o($Vn,[2,49]),o($VN,[2,66],{79:104,75:$Vz,80:$VB,81:$VC,82:$VD,83:$VE,84:$VF,85:$VG,86:$VH,87:$VI,88:$VJ}),{33:132,89:$Vl,90:$Vm},{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]},o($Vn,[2,27]),{5:$VP,28:145,31:$VQ,34:$VR,36:$VS,38:$VT,40:$VU},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},o($Vn,[2,46]),{5:$VV,40:$VW,56:152,57:$VX,59:$VY},{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]},o($Vn,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},o($Vn,[2,43]),{5:$VP,28:159,31:$VQ,34:$VR,36:$VS,38:$VT,40:$VU},{5:$VP,28:160,31:$VQ,34:$VR,36:$VS,38:$VT,40:$VU},{5:$VP,28:161,31:$VQ,34:$VR,36:$VS,38:$VT,40:$VU},{5:$VP,28:162,31:$VQ,34:$VR,36:$VS,38:$VT,40:$VU},{5:$VV,40:$VW,56:163,57:$VX,59:$VY},{5:$VV,40:$VW,56:164,57:$VX,59:$VY},o($Vn,[2,23]),o($Vn,[2,24]),o($Vn,[2,25]),o($Vn,[2,26]),o($Vn,[2,44]),o($Vn,[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:__name(function(str,hash){if(hash.recoverable)this.trace(str);else{var error=new Error(str);throw error.hash=hash,error}},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,TERROR=2,EOF=1,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,typeof lexer2.yylloc>"u"&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;typeof sharedState.yy.parseError=="function"?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function popStack(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n}__name(popStack,"popStack");function lex(){var token;return token=tstack.pop()||lexer2.lex()||EOF,typeof token!="number"&&(token instanceof Array&&(tstack=token,token=tstack.pop()),token=self.symbols_[token]||token),token}__name(lex,"lex");for(var symbol,state,action,r,yyval={},p,len,newState,expected;;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:((symbol===null||typeof symbol>"u")&&(symbol=lex()),action=table[state]&&table[state][symbol]),typeof action>"u"||!action.length||!action[0]){var errStr="";expected=[];for(p in table[state])this.terminals_[p]&&p>TERROR&&expected.push("'"+this.terminals_[p]+"'");lexer2.showPosition?errStr="Parse error on line "+(yylineno+1)+`:
|
|
2
|
+
`+lexer2.showPosition()+`
|
|
3
|
+
Expecting `+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":errStr="Parse error on line "+(yylineno+1)+": Unexpected "+(symbol==EOF?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args)),typeof r<"u")return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=(function(){var lexer2={EOF:1,parseError:__name(function(str,hash){if(this.yy.parser)this.yy.parser.parseError(str,hash);else throw new Error(str)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,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:__name(function(){var ch=this._input[0];this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch;var lines=ch.match(/(?:\r\n?|\n).*/g);return lines?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=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),lines.length-1&&(this.yylineno-=lines.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:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+`
|
|
5
|
+
`+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={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&&(backup.yylloc.range=this.yylloc.range.slice(0))),lines=match[0].match(/(?:\r\n?|\n).*/g),lines&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,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(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var token,match,tempMatch,index;this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if(tempMatch=this._input.match(this.rules[rules[i]]),tempMatch&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(token=this.test_match(tempMatch,rules[i]),token!==!1)return token;if(this._backtrack){match=!1;continue}else return!1}else if(!this.options.flex)break}return match?(token=this.test_match(match,rules[index]),token!==!1?token:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(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:__name(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){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: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:break;case 14:break;case 15: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:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();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 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return yy_.yytext=yy_.yytext.trim(),89;case 68:return 75;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}}};return lexer2})();parser2.lexer=lexer;function Parser(){this.yy={}}return __name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser})();parser.parser=parser;var requirementDiagram_default=parser,_a,RequirementDB=(_a=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=setAccTitle,this.getAccTitle=getAccTitle,this.setAccDescription=setAccDescription,this.getAccDescription=getAccDescription,this.setDiagramTitle=setDiagramTitle,this.getDiagramTitle=getDiagramTitle,this.getConfig=__name(()=>getConfig2().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(dir){this.direction=dir}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(name,type){return this.requirements.has(name)||this.requirements.set(name,{name,type,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(name)}getRequirements(){return this.requirements}setNewReqId(id){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=id)}setNewReqText(text){this.latestRequirement!==void 0&&(this.latestRequirement.text=text)}setNewReqRisk(risk){this.latestRequirement!==void 0&&(this.latestRequirement.risk=risk)}setNewReqVerifyMethod(verifyMethod){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=verifyMethod)}addElement(name){return this.elements.has(name)||(this.elements.set(name,{name,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),log.info("Added new element: ",name)),this.resetLatestElement(),this.elements.get(name)}getElements(){return this.elements}setNewElementType(type){this.latestElement!==void 0&&(this.latestElement.type=type)}setNewElementDocRef(docRef){this.latestElement!==void 0&&(this.latestElement.docRef=docRef)}addRelationship(type,src,dst){this.relations.push({type,src,dst})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,clear()}setCssStyle(ids,styles){for(const id of ids){const node=this.requirements.get(id)??this.elements.get(id);if(!styles||!node)return;for(const s of styles)s.includes(",")?node.cssStyles.push(...s.split(",")):node.cssStyles.push(s)}}setClass(ids,classNames){var _a2;for(const id of ids){const node=this.requirements.get(id)??this.elements.get(id);if(node)for(const _class of classNames){node.classes.push(_class);const styles=(_a2=this.classes.get(_class))==null?void 0:_a2.styles;styles&&node.cssStyles.push(...styles)}}}defineClass(ids,style){for(const id of ids){let styleClass=this.classes.get(id);styleClass===void 0&&(styleClass={id,styles:[],textStyles:[]},this.classes.set(id,styleClass)),style&&style.forEach(function(s){if(/color/.exec(s)){const newStyle=s.replace("fill","bgFill");styleClass.textStyles.push(newStyle)}styleClass.styles.push(s)}),this.requirements.forEach(value=>{value.classes.includes(id)&&value.cssStyles.push(...style.flatMap(s=>s.split(",")))}),this.elements.forEach(value=>{value.classes.includes(id)&&value.cssStyles.push(...style.flatMap(s=>s.split(",")))})}}getClasses(){return this.classes}getData(){var _a2,_b,_c,_d;const config=getConfig2(),nodes=[],edges=[];for(const requirement of this.requirements.values()){const node=requirement;node.id=requirement.name,node.cssStyles=requirement.cssStyles,node.cssClasses=requirement.classes.join(" "),node.shape="requirementBox",node.look=config.look,node.colorIndex=nodes.length,nodes.push(node)}for(const element of this.elements.values()){const node=element;node.shape="requirementBox",node.look=config.look,node.id=element.name,node.cssStyles=element.cssStyles,node.cssClasses=element.classes.join(" "),node.colorIndex=nodes.length,nodes.push(node)}for(const relation of this.relations){let counter=0;const isContains=relation.type===this.Relationships.CONTAINS,edge={id:`${relation.src}-${relation.dst}-${counter}`,start:((_a2=this.requirements.get(relation.src))==null?void 0:_a2.name)??((_b=this.elements.get(relation.src))==null?void 0:_b.name),end:((_c=this.requirements.get(relation.dst))==null?void 0:_c.name)??((_d=this.elements.get(relation.dst))==null?void 0:_d.name),label:`<<${relation.type}>>`,classes:"relationshipLine",style:["fill:none",isContains?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:isContains?"normal":"dashed",arrowTypeStart:isContains?"requirement_contains":"",arrowTypeEnd:isContains?"":"requirement_arrow",look:config.look,labelType:"markdown"};edges.push(edge),counter++}return{nodes,edges,other:{},config,direction:this.getDirection()}}},__name(_a,"RequirementDB"),_a),genColor=__name(options=>{const config=getConfig(),{themeVariables,look}=config,{bkgColorArray,borderColorArray}=themeVariables;if(!(borderColorArray!=null&&borderColorArray.length))return"";let sections="";for(let i=0;i<options.THEME_COLOR_LIMIT;i++)sections+=`
|
|
7
|
+
|
|
8
|
+
[data-look="${look}"][data-color-id="color-${i}"].node path {
|
|
9
|
+
stroke: ${borderColorArray[i]};
|
|
10
|
+
fill: ${bkgColorArray!=null&&bkgColorArray.length?bkgColorArray[i]:""};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
[data-look="${look}"][data-color-id="color-${i}"].node rect {
|
|
14
|
+
stroke: ${borderColorArray[i]};
|
|
15
|
+
fill: ${bkgColorArray!=null&&bkgColorArray.length?bkgColorArray[i]:""};
|
|
16
|
+
}
|
|
17
|
+
`;return sections},"genColor"),getStyles=__name(options=>{const config=getConfig(),{look,themeVariables}=config,{requirementEdgeLabelBackground}=themeVariables;return`
|
|
18
|
+
${genColor(options)}
|
|
19
|
+
marker {
|
|
20
|
+
fill: ${options.relationColor};
|
|
21
|
+
stroke: ${options.relationColor};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
marker.cross {
|
|
25
|
+
stroke: ${options.lineColor};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
svg {
|
|
29
|
+
font-family: ${options.fontFamily};
|
|
30
|
+
font-size: ${options.fontSize};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.reqBox {
|
|
34
|
+
fill: ${options.requirementBackground};
|
|
35
|
+
fill-opacity: 1.0;
|
|
36
|
+
stroke: ${options.requirementBorderColor};
|
|
37
|
+
stroke-width: ${options.requirementBorderSize};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.reqTitle, .reqLabel{
|
|
41
|
+
fill: ${options.requirementTextColor};
|
|
42
|
+
}
|
|
43
|
+
.reqLabelBox {
|
|
44
|
+
fill: ${options.relationLabelBackground};
|
|
45
|
+
fill-opacity: 1.0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.req-title-line {
|
|
49
|
+
stroke: ${options.requirementBorderColor};
|
|
50
|
+
stroke-width: ${options.requirementBorderSize};
|
|
51
|
+
}
|
|
52
|
+
.relationshipLine {
|
|
53
|
+
stroke: ${options.relationColor};
|
|
54
|
+
stroke-width: ${look==="neo"?options.strokeWidth:"1px"};
|
|
55
|
+
}
|
|
56
|
+
.relationshipLabel {
|
|
57
|
+
fill: ${options.relationLabelColor};
|
|
58
|
+
}
|
|
59
|
+
.edgeLabel {
|
|
60
|
+
background-color: ${options.edgeLabelBackground};
|
|
61
|
+
}
|
|
62
|
+
.edgeLabel .label rect {
|
|
63
|
+
fill: ${options.edgeLabelBackground};
|
|
64
|
+
}
|
|
65
|
+
.edgeLabel .label text {
|
|
66
|
+
fill: ${options.relationLabelColor};
|
|
67
|
+
}
|
|
68
|
+
.divider {
|
|
69
|
+
stroke: ${options.nodeBorder};
|
|
70
|
+
stroke-width: 1;
|
|
71
|
+
}
|
|
72
|
+
.label {
|
|
73
|
+
font-family: ${options.fontFamily};
|
|
74
|
+
color: ${options.nodeTextColor||options.textColor};
|
|
75
|
+
}
|
|
76
|
+
.label text,span {
|
|
77
|
+
fill: ${options.nodeTextColor||options.textColor};
|
|
78
|
+
color: ${options.nodeTextColor||options.textColor};
|
|
79
|
+
}
|
|
80
|
+
.labelBkg {
|
|
81
|
+
background-color: ${requirementEdgeLabelBackground??options.edgeLabelBackground};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
`},"getStyles"),styles_default=getStyles,requirementRenderer_exports={};__export(requirementRenderer_exports,{draw:()=>draw});var draw=__name(async function(text,id,_version,diag){log.info("REF0:"),log.info("Drawing requirement diagram (unified)",id);const{securityLevel,state:conf,layout,look}=getConfig2(),data4Layout=diag.db.getData(),svg=getDiagramElement(id,securityLevel);data4Layout.type=diag.type,data4Layout.layoutAlgorithm=getRegisteredLayoutAlgorithm(layout),data4Layout.nodeSpacing=(conf==null?void 0:conf.nodeSpacing)??50,data4Layout.rankSpacing=(conf==null?void 0:conf.rankSpacing)??50,data4Layout.markers=look==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],data4Layout.diagramId=id,await render(data4Layout,svg);const padding=8;utils_default.insertTitle(svg,"requirementDiagramTitleText",(conf==null?void 0:conf.titleTopMargin)??25,diag.db.getDiagramTitle()),setupViewPortForSVG(svg,padding,"requirementDiagram",(conf==null?void 0:conf.useMaxWidth)??!0)},"draw"),diagram={parser:requirementDiagram_default,get db(){return new RequirementDB},renderer:requirementRenderer_exports,styles:styles_default};export{diagram};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{p as setDiagramTitle,q as getDiagramTitle,s as setAccDescription,g as getAccDescription,b as setAccTitle,a as getAccTitle,_ as __name,c as getConfig2,z as defaultConfig2,d as select,X as setupGraphViewbox,y as clear,k as common_default}from"./mermaid.core-DNvsWVDx.js";import{o as ordinal}from"./ordinal-aRyHI6gl.js";import"./index-DJ0iGKLy.js";import"./vendor-codemirror-DxvDOrio.js";import"./vendor-antd-Dk5s46Ag.js";import"./vendor-markdown-DO-Ppp4f.js";import"./init-C7FSzFHJ.js";function colors(specifier){for(var n=specifier.length/6|0,colors2=new Array(n),i=0;i<n;)colors2[i]="#"+specifier.slice(i*6,++i*6);return colors2}const d3schemeTableau10=colors("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function max(values,valueof){let max2;if(valueof===void 0)for(const value2 of values)value2!=null&&(max2<value2||max2===void 0&&value2>=value2)&&(max2=value2);else{let index=-1;for(let value2 of values)(value2=valueof(value2,++index,values))!=null&&(max2<value2||max2===void 0&&value2>=value2)&&(max2=value2)}return max2}function min(values,valueof){let min2;if(valueof===void 0)for(const value2 of values)value2!=null&&(min2>value2||min2===void 0&&value2>=value2)&&(min2=value2);else{let index=-1;for(let value2 of values)(value2=valueof(value2,++index,values))!=null&&(min2>value2||min2===void 0&&value2>=value2)&&(min2=value2)}return min2}function sum(values,valueof){let sum2=0;if(valueof===void 0)for(let value2 of values)(value2=+value2)&&(sum2+=value2);else{let index=-1;for(let value2 of values)(value2=+valueof(value2,++index,values))&&(sum2+=value2)}return sum2}function targetDepth(d){return d.target.depth}function left(node){return node.depth}function right(node,n){return n-1-node.height}function justify(node,n){return node.sourceLinks.length?node.depth:n-1}function center(node){return node.targetLinks.length?node.depth:node.sourceLinks.length?min(node.sourceLinks,targetDepth)-1:0}function constant$1(x2){return function(){return x2}}function ascendingSourceBreadth(a,b){return ascendingBreadth(a.source,b.source)||a.index-b.index}function ascendingTargetBreadth(a,b){return ascendingBreadth(a.target,b.target)||a.index-b.index}function ascendingBreadth(a,b){return a.y0-b.y0}function value(d){return d.value}function defaultId(d){return d.index}function defaultNodes(graph){return graph.nodes}function defaultLinks(graph){return graph.links}function find(nodeById,id){const node=nodeById.get(id);if(!node)throw new Error("missing: "+id);return node}function computeLinkBreadths({nodes:nodes2}){for(const node of nodes2){let y0=node.y0,y1=y0;for(const link2 of node.sourceLinks)link2.y0=y0+link2.width/2,y0+=link2.width;for(const link2 of node.targetLinks)link2.y1=y1+link2.width/2,y1+=link2.width}}function Sankey(){let x0=0,y0=0,x1=1,y1=1,dx=24,dy=8,py,id=defaultId,align=justify,sort,linkSort,nodes2=defaultNodes,links2=defaultLinks,iterations=6;function sankey(){const graph={nodes:nodes2.apply(null,arguments),links:links2.apply(null,arguments)};return computeNodeLinks(graph),computeNodeValues(graph),computeNodeDepths(graph),computeNodeHeights(graph),computeNodeBreadths(graph),computeLinkBreadths(graph),graph}sankey.update=function(graph){return computeLinkBreadths(graph),graph},sankey.nodeId=function(_){return arguments.length?(id=typeof _=="function"?_:constant$1(_),sankey):id},sankey.nodeAlign=function(_){return arguments.length?(align=typeof _=="function"?_:constant$1(_),sankey):align},sankey.nodeSort=function(_){return arguments.length?(sort=_,sankey):sort},sankey.nodeWidth=function(_){return arguments.length?(dx=+_,sankey):dx},sankey.nodePadding=function(_){return arguments.length?(dy=py=+_,sankey):dy},sankey.nodes=function(_){return arguments.length?(nodes2=typeof _=="function"?_:constant$1(_),sankey):nodes2},sankey.links=function(_){return arguments.length?(links2=typeof _=="function"?_:constant$1(_),sankey):links2},sankey.linkSort=function(_){return arguments.length?(linkSort=_,sankey):linkSort},sankey.size=function(_){return arguments.length?(x0=y0=0,x1=+_[0],y1=+_[1],sankey):[x1-x0,y1-y0]},sankey.extent=function(_){return arguments.length?(x0=+_[0][0],x1=+_[1][0],y0=+_[0][1],y1=+_[1][1],sankey):[[x0,y0],[x1,y1]]},sankey.iterations=function(_){return arguments.length?(iterations=+_,sankey):iterations};function computeNodeLinks({nodes:nodes3,links:links3}){for(const[i,node]of nodes3.entries())node.index=i,node.sourceLinks=[],node.targetLinks=[];const nodeById=new Map(nodes3.map((d,i)=>[id(d,i,nodes3),d]));for(const[i,link2]of links3.entries()){link2.index=i;let{source,target}=link2;typeof source!="object"&&(source=link2.source=find(nodeById,source)),typeof target!="object"&&(target=link2.target=find(nodeById,target)),source.sourceLinks.push(link2),target.targetLinks.push(link2)}if(linkSort!=null)for(const{sourceLinks,targetLinks}of nodes3)sourceLinks.sort(linkSort),targetLinks.sort(linkSort)}function computeNodeValues({nodes:nodes3}){for(const node of nodes3)node.value=node.fixedValue===void 0?Math.max(sum(node.sourceLinks,value),sum(node.targetLinks,value)):node.fixedValue}function computeNodeDepths({nodes:nodes3}){const n=nodes3.length;let current=new Set(nodes3),next=new Set,x2=0;for(;current.size;){for(const node of current){node.depth=x2;for(const{target}of node.sourceLinks)next.add(target)}if(++x2>n)throw new Error("circular link");current=next,next=new Set}}function computeNodeHeights({nodes:nodes3}){const n=nodes3.length;let current=new Set(nodes3),next=new Set,x2=0;for(;current.size;){for(const node of current){node.height=x2;for(const{source}of node.targetLinks)next.add(source)}if(++x2>n)throw new Error("circular link");current=next,next=new Set}}function computeNodeLayers({nodes:nodes3}){const x2=max(nodes3,d=>d.depth)+1,kx=(x1-x0-dx)/(x2-1),columns=new Array(x2);for(const node of nodes3){const i=Math.max(0,Math.min(x2-1,Math.floor(align.call(null,node,x2))));node.layer=i,node.x0=x0+i*kx,node.x1=node.x0+dx,columns[i]?columns[i].push(node):columns[i]=[node]}if(sort)for(const column of columns)column.sort(sort);return columns}function initializeNodeBreadths(columns){const ky=min(columns,c=>(y1-y0-(c.length-1)*py)/sum(c,value));for(const nodes3 of columns){let y2=y0;for(const node of nodes3){node.y0=y2,node.y1=y2+node.value*ky,y2=node.y1+py;for(const link2 of node.sourceLinks)link2.width=link2.value*ky}y2=(y1-y2+py)/(nodes3.length+1);for(let i=0;i<nodes3.length;++i){const node=nodes3[i];node.y0+=y2*(i+1),node.y1+=y2*(i+1)}reorderLinks(nodes3)}}function computeNodeBreadths(graph){const columns=computeNodeLayers(graph);py=Math.min(dy,(y1-y0)/(max(columns,c=>c.length)-1)),initializeNodeBreadths(columns);for(let i=0;i<iterations;++i){const alpha=Math.pow(.99,i),beta=Math.max(1-alpha,(i+1)/iterations);relaxRightToLeft(columns,alpha,beta),relaxLeftToRight(columns,alpha,beta)}}function relaxLeftToRight(columns,alpha,beta){for(let i=1,n=columns.length;i<n;++i){const column=columns[i];for(const target of column){let y2=0,w=0;for(const{source,value:value2}of target.targetLinks){let v=value2*(target.layer-source.layer);y2+=targetTop(source,target)*v,w+=v}if(!(w>0))continue;let dy2=(y2/w-target.y0)*alpha;target.y0+=dy2,target.y1+=dy2,reorderNodeLinks(target)}sort===void 0&&column.sort(ascendingBreadth),resolveCollisions(column,beta)}}function relaxRightToLeft(columns,alpha,beta){for(let n=columns.length,i=n-2;i>=0;--i){const column=columns[i];for(const source of column){let y2=0,w=0;for(const{target,value:value2}of source.sourceLinks){let v=value2*(target.layer-source.layer);y2+=sourceTop(source,target)*v,w+=v}if(!(w>0))continue;let dy2=(y2/w-source.y0)*alpha;source.y0+=dy2,source.y1+=dy2,reorderNodeLinks(source)}sort===void 0&&column.sort(ascendingBreadth),resolveCollisions(column,beta)}}function resolveCollisions(nodes3,alpha){const i=nodes3.length>>1,subject=nodes3[i];resolveCollisionsBottomToTop(nodes3,subject.y0-py,i-1,alpha),resolveCollisionsTopToBottom(nodes3,subject.y1+py,i+1,alpha),resolveCollisionsBottomToTop(nodes3,y1,nodes3.length-1,alpha),resolveCollisionsTopToBottom(nodes3,y0,0,alpha)}function resolveCollisionsTopToBottom(nodes3,y2,i,alpha){for(;i<nodes3.length;++i){const node=nodes3[i],dy2=(y2-node.y0)*alpha;dy2>1e-6&&(node.y0+=dy2,node.y1+=dy2),y2=node.y1+py}}function resolveCollisionsBottomToTop(nodes3,y2,i,alpha){for(;i>=0;--i){const node=nodes3[i],dy2=(node.y1-y2)*alpha;dy2>1e-6&&(node.y0-=dy2,node.y1-=dy2),y2=node.y0-py}}function reorderNodeLinks({sourceLinks,targetLinks}){if(linkSort===void 0){for(const{source:{sourceLinks:sourceLinks2}}of targetLinks)sourceLinks2.sort(ascendingTargetBreadth);for(const{target:{targetLinks:targetLinks2}}of sourceLinks)targetLinks2.sort(ascendingSourceBreadth)}}function reorderLinks(nodes3){if(linkSort===void 0)for(const{sourceLinks,targetLinks}of nodes3)sourceLinks.sort(ascendingTargetBreadth),targetLinks.sort(ascendingSourceBreadth)}function targetTop(source,target){let y2=source.y0-(source.sourceLinks.length-1)*py/2;for(const{target:node,width}of source.sourceLinks){if(node===target)break;y2+=width+py}for(const{source:node,width}of target.targetLinks){if(node===source)break;y2-=width}return y2}function sourceTop(source,target){let y2=target.y0-(target.targetLinks.length-1)*py/2;for(const{source:node,width}of target.targetLinks){if(node===source)break;y2+=width+py}for(const{target:node,width}of source.sourceLinks){if(node===target)break;y2-=width}return y2}return sankey}var pi=Math.PI,tau=2*pi,epsilon=1e-6,tauEpsilon=tau-epsilon;function Path(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function path(){return new Path}Path.prototype=path.prototype={constructor:Path,moveTo:function(x2,y2){this._+="M"+(this._x0=this._x1=+x2)+","+(this._y0=this._y1=+y2)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(x2,y2){this._+="L"+(this._x1=+x2)+","+(this._y1=+y2)},quadraticCurveTo:function(x1,y1,x2,y2){this._+="Q"+ +x1+","+ +y1+","+(this._x1=+x2)+","+(this._y1=+y2)},bezierCurveTo:function(x1,y1,x2,y2,x3,y3){this._+="C"+ +x1+","+ +y1+","+ +x2+","+ +y2+","+(this._x1=+x3)+","+(this._y1=+y3)},arcTo:function(x1,y1,x2,y2,r){x1=+x1,y1=+y1,x2=+x2,y2=+y2,r=+r;var x0=this._x1,y0=this._y1,x21=x2-x1,y21=y2-y1,x01=x0-x1,y01=y0-y1,l01_2=x01*x01+y01*y01;if(r<0)throw new Error("negative radius: "+r);if(this._x1===null)this._+="M"+(this._x1=x1)+","+(this._y1=y1);else if(l01_2>epsilon)if(!(Math.abs(y01*x21-y21*x01)>epsilon)||!r)this._+="L"+(this._x1=x1)+","+(this._y1=y1);else{var x20=x2-x0,y20=y2-y0,l21_2=x21*x21+y21*y21,l20_2=x20*x20+y20*y20,l21=Math.sqrt(l21_2),l01=Math.sqrt(l01_2),l=r*Math.tan((pi-Math.acos((l21_2+l01_2-l20_2)/(2*l21*l01)))/2),t01=l/l01,t21=l/l21;Math.abs(t01-1)>epsilon&&(this._+="L"+(x1+t01*x01)+","+(y1+t01*y01)),this._+="A"+r+","+r+",0,0,"+ +(y01*x20>x01*y20)+","+(this._x1=x1+t21*x21)+","+(this._y1=y1+t21*y21)}},arc:function(x2,y2,r,a0,a1,ccw){x2=+x2,y2=+y2,r=+r,ccw=!!ccw;var dx=r*Math.cos(a0),dy=r*Math.sin(a0),x0=x2+dx,y0=y2+dy,cw=1^ccw,da=ccw?a0-a1:a1-a0;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+x0+","+y0:(Math.abs(this._x1-x0)>epsilon||Math.abs(this._y1-y0)>epsilon)&&(this._+="L"+x0+","+y0),r&&(da<0&&(da=da%tau+tau),da>tauEpsilon?this._+="A"+r+","+r+",0,1,"+cw+","+(x2-dx)+","+(y2-dy)+"A"+r+","+r+",0,1,"+cw+","+(this._x1=x0)+","+(this._y1=y0):da>epsilon&&(this._+="A"+r+","+r+",0,"+ +(da>=pi)+","+cw+","+(this._x1=x2+r*Math.cos(a1))+","+(this._y1=y2+r*Math.sin(a1))))},rect:function(x2,y2,w,h){this._+="M"+(this._x0=this._x1=+x2)+","+(this._y0=this._y1=+y2)+"h"+ +w+"v"+ +h+"h"+-w+"Z"},toString:function(){return this._}};function constant(x2){return function(){return x2}}function x(p){return p[0]}function y(p){return p[1]}var slice=Array.prototype.slice;function linkSource(d){return d.source}function linkTarget(d){return d.target}function link(curve){var source=linkSource,target=linkTarget,x$1=x,y$1=y,context=null;function link2(){var buffer,argv=slice.call(arguments),s=source.apply(this,argv),t=target.apply(this,argv);if(context||(context=buffer=path()),curve(context,+x$1.apply(this,(argv[0]=s,argv)),+y$1.apply(this,argv),+x$1.apply(this,(argv[0]=t,argv)),+y$1.apply(this,argv)),buffer)return context=null,buffer+""||null}return link2.source=function(_){return arguments.length?(source=_,link2):source},link2.target=function(_){return arguments.length?(target=_,link2):target},link2.x=function(_){return arguments.length?(x$1=typeof _=="function"?_:constant(+_),link2):x$1},link2.y=function(_){return arguments.length?(y$1=typeof _=="function"?_:constant(+_),link2):y$1},link2.context=function(_){return arguments.length?(context=_??null,link2):context},link2}function curveHorizontal(context,x0,y0,x1,y1){context.moveTo(x0,y0),context.bezierCurveTo(x0=(x0+x1)/2,y0,x0,y1,x1,y1)}function linkHorizontal(){return link(curveHorizontal)}function horizontalSource(d){return[d.source.x1,d.y0]}function horizontalTarget(d){return[d.target.x0,d.y1]}function d3SankeyLinkHorizontal(){return linkHorizontal().source(horizontalSource).target(horizontalTarget)}var parser=(function(){var o=__name(function(k,v,o2,l){for(o2=o2||{},l=k.length;l--;o2[k[l]]=v);return o2},"o"),$V0=[1,9],$V1=[1,10],$V2=[1,5,10,12],parser2={trace:__name(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:__name(function(yytext,yyleng,yylineno,yy,yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 7:const source=yy.findOrCreateNode($$[$0-4].trim().replaceAll('""','"')),target=yy.findOrCreateNode($$[$0-2].trim().replaceAll('""','"')),value2=parseFloat($$[$0].trim());yy.addLink(source,target,value2);break;case 8:case 9:case 11:this.$=$$[$0];break;case 10:this.$=$$[$0-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:$V0,20:$V1},{1:[2,6],7:11,10:[1,12]},o($V1,[2,4],{9:13,5:[1,14]}),{12:[1,15]},o($V2,[2,8]),o($V2,[2,9]),{19:[1,16]},o($V2,[2,11]),{1:[2,1]},{1:[2,5]},o($V1,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:$V0,20:$V1},{15:18,16:7,17:8,18:$V0,20:$V1},{18:[1,19]},o($V1,[2,3]),{12:[1,20]},o($V2,[2,10]),{15:21,16:7,17:8,18:$V0,20:$V1},o([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:__name(function(str,hash){if(hash.recoverable)this.trace(str);else{var error=new Error(str);throw error.hash=hash,error}},"parseError"),parse:__name(function(input){var self=this,stack=[0],tstack=[],vstack=[null],lstack=[],table=this.table,yytext="",yylineno=0,yyleng=0,TERROR=2,EOF=1,args=lstack.slice.call(arguments,1),lexer2=Object.create(this.lexer),sharedState={yy:{}};for(var k in this.yy)Object.prototype.hasOwnProperty.call(this.yy,k)&&(sharedState.yy[k]=this.yy[k]);lexer2.setInput(input,sharedState.yy),sharedState.yy.lexer=lexer2,sharedState.yy.parser=this,typeof lexer2.yylloc>"u"&&(lexer2.yylloc={});var yyloc=lexer2.yylloc;lstack.push(yyloc);var ranges=lexer2.options&&lexer2.options.ranges;typeof sharedState.yy.parseError=="function"?this.parseError=sharedState.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function popStack(n){stack.length=stack.length-2*n,vstack.length=vstack.length-n,lstack.length=lstack.length-n}__name(popStack,"popStack");function lex(){var token;return token=tstack.pop()||lexer2.lex()||EOF,typeof token!="number"&&(token instanceof Array&&(tstack=token,token=tstack.pop()),token=self.symbols_[token]||token),token}__name(lex,"lex");for(var symbol,state,action,r,yyval={},p,len,newState,expected;;){if(state=stack[stack.length-1],this.defaultActions[state]?action=this.defaultActions[state]:((symbol===null||typeof symbol>"u")&&(symbol=lex()),action=table[state]&&table[state][symbol]),typeof action>"u"||!action.length||!action[0]){var errStr="";expected=[];for(p in table[state])this.terminals_[p]&&p>TERROR&&expected.push("'"+this.terminals_[p]+"'");lexer2.showPosition?errStr="Parse error on line "+(yylineno+1)+`:
|
|
2
|
+
`+lexer2.showPosition()+`
|
|
3
|
+
Expecting `+expected.join(", ")+", got '"+(this.terminals_[symbol]||symbol)+"'":errStr="Parse error on line "+(yylineno+1)+": Unexpected "+(symbol==EOF?"end of input":"'"+(this.terminals_[symbol]||symbol)+"'"),this.parseError(errStr,{text:lexer2.match,token:this.terminals_[symbol]||symbol,line:lexer2.yylineno,loc:yyloc,expected})}if(action[0]instanceof Array&&action.length>1)throw new Error("Parse Error: multiple actions possible at state: "+state+", token: "+symbol);switch(action[0]){case 1:stack.push(symbol),vstack.push(lexer2.yytext),lstack.push(lexer2.yylloc),stack.push(action[1]),symbol=null,yyleng=lexer2.yyleng,yytext=lexer2.yytext,yylineno=lexer2.yylineno,yyloc=lexer2.yylloc;break;case 2:if(len=this.productions_[action[1]][1],yyval.$=vstack[vstack.length-len],yyval._$={first_line:lstack[lstack.length-(len||1)].first_line,last_line:lstack[lstack.length-1].last_line,first_column:lstack[lstack.length-(len||1)].first_column,last_column:lstack[lstack.length-1].last_column},ranges&&(yyval._$.range=[lstack[lstack.length-(len||1)].range[0],lstack[lstack.length-1].range[1]]),r=this.performAction.apply(yyval,[yytext,yyleng,yylineno,sharedState.yy,action[1],vstack,lstack].concat(args)),typeof r<"u")return r;len&&(stack=stack.slice(0,-1*len*2),vstack=vstack.slice(0,-1*len),lstack=lstack.slice(0,-1*len)),stack.push(this.productions_[action[1]][0]),vstack.push(yyval.$),lstack.push(yyval._$),newState=table[stack[stack.length-2]][stack[stack.length-1]],stack.push(newState);break;case 3:return!0}}return!0},"parse")},lexer=(function(){var lexer2={EOF:1,parseError:__name(function(str,hash){if(this.yy.parser)this.yy.parser.parseError(str,hash);else throw new Error(str)},"parseError"),setInput:__name(function(input,yy){return this.yy=yy||this.yy||{},this._input=input,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:__name(function(){var ch=this._input[0];this.yytext+=ch,this.yyleng++,this.offset++,this.match+=ch,this.matched+=ch;var lines=ch.match(/(?:\r\n?|\n).*/g);return lines?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ch},"input"),unput:__name(function(ch){var len=ch.length,lines=ch.split(/(?:\r\n?|\n)/g);this._input=ch+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-len),this.offset-=len;var oldLines=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),lines.length-1&&(this.yylineno-=lines.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:lines?(lines.length===oldLines.length?this.yylloc.first_column:0)+oldLines[oldLines.length-lines.length].length-lines[0].length:this.yylloc.first_column-len},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-len]),this.yyleng=this.yytext.length,this},"unput"),more:__name(function(){return this._more=!0,this},"more"),reject:__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:__name(function(n){this.unput(this.match.slice(n))},"less"),pastInput:__name(function(){var past=this.matched.substr(0,this.matched.length-this.match.length);return(past.length>20?"...":"")+past.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:__name(function(){var next=this.match;return next.length<20&&(next+=this._input.substr(0,20-next.length)),(next.substr(0,20)+(next.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:__name(function(){var pre=this.pastInput(),c=new Array(pre.length+1).join("-");return pre+this.upcomingInput()+`
|
|
5
|
+
`+c+"^"},"showPosition"),test_match:__name(function(match,indexed_rule){var token,lines,backup;if(this.options.backtrack_lexer&&(backup={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&&(backup.yylloc.range=this.yylloc.range.slice(0))),lines=match[0].match(/(?:\r\n?|\n).*/g),lines&&(this.yylineno+=lines.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lines?lines[lines.length-1].length-lines[lines.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+match[0].length},this.yytext+=match[0],this.match+=match[0],this.matches=match,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(match[0].length),this.matched+=match[0],token=this.performAction.call(this,this.yy,this,indexed_rule,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),token)return token;if(this._backtrack){for(var k in backup)this[k]=backup[k];return!1}return!1},"test_match"),next:__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var token,match,tempMatch,index;this._more||(this.yytext="",this.match="");for(var rules=this._currentRules(),i=0;i<rules.length;i++)if(tempMatch=this._input.match(this.rules[rules[i]]),tempMatch&&(!match||tempMatch[0].length>match[0].length)){if(match=tempMatch,index=i,this.options.backtrack_lexer){if(token=this.test_match(tempMatch,rules[i]),token!==!1)return token;if(this._backtrack){match=!1;continue}else return!1}else if(!this.options.flex)break}return match?(token=this.test_match(match,rules[index]),token!==!1?token:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:__name(function(condition){this.conditionStack.push(condition)},"begin"),popState:__name(function(){var n=this.conditionStack.length-1;return n>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:__name(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:__name(function(n){return n=this.conditionStack.length-1-Math.abs(n||0),n>=0?this.conditionStack[n]:"INITIAL"},"topState"),pushState:__name(function(condition){this.begin(condition)},"pushState"),stateStackSize:__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:__name(function(yy,yy_,$avoiding_name_collisions,YY_START){switch($avoiding_name_collisions){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\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:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return lexer2})();parser2.lexer=lexer;function Parser(){this.yy={}}return __name(Parser,"Parser"),Parser.prototype=parser2,parser2.Parser=Parser,new Parser})();parser.parser=parser;var sankey_default=parser,links=[],nodes=[],nodesMap=new Map,clear2=__name(()=>{links=[],nodes=[],nodesMap=new Map,clear()},"clear"),_a,SankeyLink=(_a=class{constructor(source,target,value2=0){this.source=source,this.target=target,this.value=value2}},__name(_a,"SankeyLink"),_a),addLink=__name((source,target,value2)=>{links.push(new SankeyLink(source,target,value2))},"addLink"),_a2,SankeyNode=(_a2=class{constructor(ID){this.ID=ID}},__name(_a2,"SankeyNode"),_a2),findOrCreateNode=__name(ID=>{ID=common_default.sanitizeText(ID,getConfig2());let node=nodesMap.get(ID);return node===void 0&&(node=new SankeyNode(ID),nodesMap.set(ID,node),nodes.push(node)),node},"findOrCreateNode"),getNodes=__name(()=>nodes,"getNodes"),getLinks=__name(()=>links,"getLinks"),getGraph=__name(()=>({nodes:nodes.map(node=>({id:node.ID})),links:links.map(link2=>({source:link2.source.ID,target:link2.target.ID,value:link2.value}))}),"getGraph"),sankeyDB_default={nodesMap,getConfig:__name(()=>getConfig2().sankey,"getConfig"),getNodes,getLinks,getGraph,addLink,findOrCreateNode,getAccTitle,setAccTitle,getAccDescription,setAccDescription,getDiagramTitle,setDiagramTitle,clear:clear2},_a3,Uid=(_a3=class{static next(name){return new _a3(name+ ++_a3.count)}constructor(id){this.id=id,this.href=`#${id}`}toString(){return"url("+this.href+")"}},__name(_a3,"Uid"),_a3.count=0,_a3),alignmentsMap={left,right,center,justify},draw=__name(function(text,id,_version,diagObj){const{securityLevel,sankey:conf}=getConfig2(),defaultSankeyConfig=defaultConfig2.sankey;let sandboxElement;securityLevel==="sandbox"&&(sandboxElement=select("#i"+id));const root=securityLevel==="sandbox"?select(sandboxElement.nodes()[0].contentDocument.body):select("body"),svg=securityLevel==="sandbox"?root.select(`[id="${id}"]`):select(`[id="${id}"]`),width=(conf==null?void 0:conf.width)??defaultSankeyConfig.width,height=(conf==null?void 0:conf.height)??defaultSankeyConfig.width,useMaxWidth=(conf==null?void 0:conf.useMaxWidth)??defaultSankeyConfig.useMaxWidth,nodeAlignment=(conf==null?void 0:conf.nodeAlignment)??defaultSankeyConfig.nodeAlignment,prefix=(conf==null?void 0:conf.prefix)??defaultSankeyConfig.prefix,suffix=(conf==null?void 0:conf.suffix)??defaultSankeyConfig.suffix,showValues=(conf==null?void 0:conf.showValues)??defaultSankeyConfig.showValues,graph=diagObj.db.getGraph(),nodeAlign=alignmentsMap[nodeAlignment];Sankey().nodeId(d=>d.id).nodeWidth(10).nodePadding(10+(showValues?15:0)).nodeAlign(nodeAlign).extent([[0,0],[width,height]])(graph);const colorScheme=ordinal(d3schemeTableau10);svg.append("g").attr("class","nodes").selectAll(".node").data(graph.nodes).join("g").attr("class","node").attr("id",d=>(d.uid=Uid.next("node-")).id).attr("transform",function(d){return"translate("+d.x0+","+d.y0+")"}).attr("x",d=>d.x0).attr("y",d=>d.y0).append("rect").attr("height",d=>d.y1-d.y0).attr("width",d=>d.x1-d.x0).attr("fill",d=>colorScheme(d.id));const getText=__name(({id:id2,value:value2})=>showValues?`${id2}
|
|
7
|
+
${prefix}${Math.round(value2*100)/100}${suffix}`:id2,"getText");svg.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(graph.nodes).join("text").attr("x",d=>d.x0<width/2?d.x1+6:d.x0-6).attr("y",d=>(d.y1+d.y0)/2).attr("dy",`${showValues?"0":"0.35"}em`).attr("text-anchor",d=>d.x0<width/2?"start":"end").text(getText);const link2=svg.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(graph.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),linkColor=(conf==null?void 0:conf.linkColor)??"gradient";if(linkColor==="gradient"){const gradient=link2.append("linearGradient").attr("id",d=>(d.uid=Uid.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",d=>d.source.x1).attr("x2",d=>d.target.x0);gradient.append("stop").attr("offset","0%").attr("stop-color",d=>colorScheme(d.source.id)),gradient.append("stop").attr("offset","100%").attr("stop-color",d=>colorScheme(d.target.id))}let coloring;switch(linkColor){case"gradient":coloring=__name(d=>d.uid,"coloring");break;case"source":coloring=__name(d=>colorScheme(d.source.id),"coloring");break;case"target":coloring=__name(d=>colorScheme(d.target.id),"coloring");break;default:coloring=linkColor}link2.append("path").attr("d",d3SankeyLinkHorizontal()).attr("stroke",coloring).attr("stroke-width",d=>Math.max(1,d.width)),setupGraphViewbox(void 0,svg,0,useMaxWidth)},"draw"),sankeyRenderer_default={draw},prepareTextForParsing=__name(text=>text.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
|
|
8
|
+
`).trim(),"prepareTextForParsing"),getStyles=__name(options=>`.label {
|
|
9
|
+
font-family: ${options.fontFamily};
|
|
10
|
+
}`,"getStyles"),styles_default=getStyles,originalParse=sankey_default.parse.bind(sankey_default);sankey_default.parse=text=>originalParse(prepareTextForParsing(text));var diagram={styles:styles_default,parser:sankey_default,db:sankeyDB_default,renderer:sankeyRenderer_default};export{diagram};
|