omni-context-cli 0.0.74 → 0.0.77
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/README.md +68 -112
- package/README.zh-CN.md +68 -112
- package/dist/agents/explore.md +26 -19
- package/dist/agents/glance.md +7 -22
- package/dist/agents/{slice.md → search.md} +4 -4
- package/dist/assets/cone-bw-white.svg +24 -7
- package/dist/assets/cone-bw.svg +24 -7
- package/dist/assets/cone-mac@256.png +0 -0
- package/dist/assets/cone-mac@512.png +0 -0
- package/dist/assets/cone.svg +24 -2
- package/dist/assets/cone@128.png +0 -0
- package/dist/assets/cone@16.png +0 -0
- package/dist/assets/cone@24.png +0 -0
- package/dist/assets/cone@256.png +0 -0
- package/dist/assets/cone@32.png +0 -0
- package/dist/assets/cone@512.png +0 -0
- package/dist/assets/cone@64.png +0 -0
- package/dist/assets/icon.ico +0 -0
- package/dist/assets/omnicontext-cli-logo-white.svg +24 -7
- package/dist/assets/omnicontext-cli-logo.svg +24 -7
- package/dist/cli.js +7 -7
- package/dist/clients/extension.vsix +0 -0
- package/dist/clients/web/assets/{_baseUniq-CH4b0N5_.js → _baseUniq-BbAI5D6T.js} +1 -1
- package/dist/clients/web/assets/{arc-BQVP7-Bp.js → arc-C01cHi_J.js} +1 -1
- package/dist/clients/web/assets/{architectureDiagram-VXUJARFQ-CZtE2OyB.js → architectureDiagram-VXUJARFQ-C4SW9geU.js} +1 -1
- package/dist/clients/web/assets/{blockDiagram-VD42YOAC-CtSz7Vx1.js → blockDiagram-VD42YOAC-BJBjUKKm.js} +1 -1
- package/dist/clients/web/assets/{c4Diagram-YG6GDRKO-CeUU0lHA.js → c4Diagram-YG6GDRKO-DRMS2exe.js} +1 -1
- package/dist/clients/web/assets/channel-BFxt5Aug.js +1 -0
- package/dist/clients/web/assets/{chunk-4BX2VUAB-Df-kQvTf.js → chunk-4BX2VUAB-DdM_Xgvz.js} +1 -1
- package/dist/clients/web/assets/{chunk-55IACEB6-DR-uhhX0.js → chunk-55IACEB6-sCGtW4jw.js} +1 -1
- package/dist/clients/web/assets/{chunk-B4BG7PRW-DOrSo5dD.js → chunk-B4BG7PRW-CrTfpFlk.js} +1 -1
- package/dist/clients/web/assets/{chunk-DI55MBZ5-BbUWe3KA.js → chunk-DI55MBZ5-BJxcEBin.js} +1 -1
- package/dist/clients/web/assets/{chunk-FMBD7UC4-BnLGK1jf.js → chunk-FMBD7UC4-ZCzWQMnr.js} +1 -1
- package/dist/clients/web/assets/{chunk-QN33PNHL-VCJVvyMp.js → chunk-QN33PNHL-7lsjOUTT.js} +1 -1
- package/dist/clients/web/assets/{chunk-QZHKN3VN-CPfXJo_T.js → chunk-QZHKN3VN-DM6taDix.js} +1 -1
- package/dist/clients/web/assets/{chunk-TZMSLE5B-BkHNVsyH.js → chunk-TZMSLE5B-Dc2DN3ii.js} +1 -1
- package/dist/clients/web/assets/classDiagram-2ON5EDUG-CMfvUA3j.js +1 -0
- package/dist/clients/web/assets/classDiagram-v2-WZHVMYZB-CMfvUA3j.js +1 -0
- package/dist/clients/web/assets/clone-BWI7Baa7.js +1 -0
- package/dist/clients/web/assets/{cose-bilkent-S5V4N54A-C9Wxnne5.js → cose-bilkent-S5V4N54A-r8T3f5yK.js} +1 -1
- package/dist/clients/web/assets/{dagre-6UL2VRFP-B6-ozXSh.js → dagre-6UL2VRFP-UnxnSeQH.js} +1 -1
- package/dist/clients/web/assets/{diagram-PSM6KHXK-D2TK1Mkk.js → diagram-PSM6KHXK-D2ENZ6qS.js} +1 -1
- package/dist/clients/web/assets/{diagram-QEK2KX5R-C5OGEwzB.js → diagram-QEK2KX5R-Eye3JgZm.js} +1 -1
- package/dist/clients/web/assets/{diagram-S2PKOQOG-CjdFw3eQ.js → diagram-S2PKOQOG-Blf5P9RJ.js} +1 -1
- package/dist/clients/web/assets/{erDiagram-Q2GNP2WA-hQIEDub-.js → erDiagram-Q2GNP2WA-wyIeLoVZ.js} +1 -1
- package/dist/clients/web/assets/{flowDiagram-NV44I4VS-WDuMquGw.js → flowDiagram-NV44I4VS-D99ef0t0.js} +1 -1
- package/dist/clients/web/assets/{ganttDiagram-JELNMOA3-BT_k8mao.js → ganttDiagram-JELNMOA3-CvsjeBuE.js} +1 -1
- package/dist/clients/web/assets/{gitGraphDiagram-NY62KEGX-Dq5JUR6E.js → gitGraphDiagram-NY62KEGX-B2ylogok.js} +1 -1
- package/dist/clients/web/assets/{graph-EhiCIhKK.js → graph-BEwCLq4h.js} +1 -1
- package/dist/clients/web/assets/index-30onxp6I.js +2 -0
- package/dist/clients/web/assets/index-pGSHhaP9.css +1 -0
- package/dist/clients/web/assets/{infoDiagram-WHAUD3N6-BrkLiOdx.js → infoDiagram-WHAUD3N6-C9HLlPj3.js} +1 -1
- package/dist/clients/web/assets/{journeyDiagram-XKPGCS4Q-2iAEjN27.js → journeyDiagram-XKPGCS4Q-BGMoCoGu.js} +1 -1
- package/dist/clients/web/assets/{kanban-definition-3W4ZIXB7-C222cIK8.js → kanban-definition-3W4ZIXB7-Z1B1b4dY.js} +1 -1
- package/dist/clients/web/assets/{layout-DDV6LJLJ.js → layout-KBr90mM8.js} +1 -1
- package/dist/clients/web/assets/{linear-Cj0itOnY.js → linear-VOTetRqU.js} +1 -1
- package/dist/clients/web/assets/{min-DB8NGWI2.js → min-BcFr1Xgw.js} +1 -1
- package/dist/clients/web/assets/{mindmap-definition-VGOIOE7T-CCAhA60J.js → mindmap-definition-VGOIOE7T-Bf9fJD2v.js} +1 -1
- package/dist/clients/web/assets/{pieDiagram-ADFJNKIX-D-XXo3zP.js → pieDiagram-ADFJNKIX-DITjn_1i.js} +1 -1
- package/dist/clients/web/assets/{quadrantDiagram-AYHSOK5B-5IBnb1WQ.js → quadrantDiagram-AYHSOK5B-CG8qEQsc.js} +1 -1
- package/dist/clients/web/assets/{requirementDiagram-UZGBJVZJ-4woYoyhj.js → requirementDiagram-UZGBJVZJ-_fiifEP6.js} +1 -1
- package/dist/clients/web/assets/{sankeyDiagram-TZEHDZUN-CQITNuFm.js → sankeyDiagram-TZEHDZUN-dGOtogtu.js} +1 -1
- package/dist/clients/web/assets/{sequenceDiagram-WL72ISMW-BIUgU_on.js → sequenceDiagram-WL72ISMW-BPWg-aZ3.js} +1 -1
- package/dist/clients/web/assets/{stateDiagram-FKZM4ZOC-C3Wi-EZk.js → stateDiagram-FKZM4ZOC-XlU9RkKz.js} +1 -1
- package/dist/clients/web/assets/stateDiagram-v2-4FDKWEC3-Rsaa7fF9.js +1 -0
- package/dist/clients/web/assets/{timeline-definition-IT6M3QCI-CwRxrax-.js → timeline-definition-IT6M3QCI-CQGxtqhi.js} +1 -1
- package/dist/clients/web/assets/{treemap-KMMF4GRG-i_IDwp2d.js → treemap-KMMF4GRG-Do7kW41s.js} +1 -1
- package/dist/clients/web/assets/{xychartDiagram-PRI3JC2R-BIS0b9I9.js → xychartDiagram-PRI3JC2R-C_QymW0P.js} +1 -1
- package/dist/clients/web/favicon.png +0 -0
- package/dist/clients/web/index.html +2 -2
- package/dist/skills/simplify/SKILL.md +53 -0
- package/dist/workflows/general.md +19 -0
- package/dist/workflows/programming.md +33 -0
- package/package.json +2 -3
- package/scripts/bump-version.mjs +0 -3
- package/scripts/clean.mjs +17 -0
- package/scripts/release-build.mjs +8 -129
- package/dist/agents/pluck.md +0 -49
- package/dist/agents/quest.md +0 -47
- package/dist/agents/ripple.md +0 -58
- package/dist/agents/sculpt.md +0 -63
- package/dist/agents/spark.md +0 -53
- package/dist/agents/sweep.md +0 -44
- package/dist/agents/weave.md +0 -54
- package/dist/clients/web/assets/channel-D-ssYovj.js +0 -1
- package/dist/clients/web/assets/classDiagram-2ON5EDUG-W6DMTXK_.js +0 -1
- package/dist/clients/web/assets/classDiagram-v2-WZHVMYZB-W6DMTXK_.js +0 -1
- package/dist/clients/web/assets/clone-Dn7sFHUy.js +0 -1
- package/dist/clients/web/assets/index-B5OdXvjH.js +0 -27
- package/dist/clients/web/assets/index-BP79FsyI.css +0 -1
- package/dist/clients/web/assets/stateDiagram-v2-4FDKWEC3-BudH3yEK.js +0 -1
- package/dist/slash/ping.md +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,a as n,c as r,d as s,i as t}from"./_baseUniq-
|
|
1
|
+
import{b as a,a as n,c as r,d as s,i as t}from"./_baseUniq-BbAI5D6T.js";import{aD as i,aE as o,aF as u}from"./index-30onxp6I.js";function f(n){return(null==n?0:n.length)?a(n):[]}function c(a,r){var s=-1,t=i(a)?Array(a.length):[];return n(a,function(a,n,i){t[++s]=r(a,n,i)}),t}function e(a,n){return(o(a)?s:c)(a,r(n))}function v(a,n){return a<n}function d(a,n,r){for(var s=-1,i=a.length;++s<i;){var o=a[s],u=n(o);if(null!=u&&(void 0===f?u==u&&!t(u):r(u,f)))var f=u,c=o}return c}function m(a){return a&&a.length?d(a,u,v):void 0}export{v as a,d as b,c,m as d,f,e as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t;import{g as e}from"./chunk-55IACEB6-DR-uhhX0.js";import{s as i}from"./chunk-QN33PNHL-VCJVvyMp.js";import{_ as s,l as n,o as r,r as o,E as h,c,i as a,aC as u,W as l,X as d,Y as f}from"./index-B5OdXvjH.js";const p=[];for(let O=0;O<256;++O)p.push((O+256).toString(16).slice(1));let m;const g=new Uint8Array(16);const E={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function N(t,e,i){var s;if(E.randomUUID&&!t)return E.randomUUID();const n=(t=t||{}).random??(null==(s=t.rng)?void 0:s.call(t))??function(){if(!m){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");m=crypto.getRandomValues.bind(crypto)}return m(g)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(t,e=0){return(p[t[e+0]]+p[t[e+1]]+p[t[e+2]]+p[t[e+3]]+"-"+p[t[e+4]]+p[t[e+5]]+"-"+p[t[e+6]]+p[t[e+7]]+"-"+p[t[e+8]]+p[t[e+9]]+"-"+p[t[e+10]]+p[t[e+11]]+p[t[e+12]]+p[t[e+13]]+p[t[e+14]]+p[t[e+15]]).toLowerCase()}(n)}var y=function(){var t=s(function(t,e,i,s){for(i=i||{},s=t.length;s--;i[t[s]]=e);return i},"o"),e=[1,4],i=[1,13],n=[1,12],r=[1,15],o=[1,16],h=[1,20],c=[1,19],a=[6,7,8],u=[1,26],l=[1,24],d=[1,25],f=[6,7,11],p=[1,6,13,15,16,19,22],m=[1,33],g=[1,34],E=[1,6,7,11,13,15,16,19,22],N={trace:s(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:s(function(t,e,i,s,n,r,o){var h=r.length-1;switch(n){case 6:case 7:return s;case 8:s.getLogger().trace("Stop NL ");break;case 9:s.getLogger().trace("Stop EOF ");break;case 11:s.getLogger().trace("Stop NL2 ");break;case 12:s.getLogger().trace("Stop EOF2 ");break;case 15:s.getLogger().info("Node: ",r[h].id),s.addNode(r[h-1].length,r[h].id,r[h].descr,r[h].type);break;case 16:s.getLogger().trace("Icon: ",r[h]),s.decorateNode({icon:r[h]});break;case 17:case 21:s.decorateNode({class:r[h]});break;case 18:s.getLogger().trace("SPACELIST");break;case 19:s.getLogger().trace("Node: ",r[h].id),s.addNode(0,r[h].id,r[h].descr,r[h].type);break;case 20:s.decorateNode({icon:r[h]});break;case 25:s.getLogger().trace("node found ..",r[h-2]),this.$={id:r[h-1],descr:r[h-1],type:s.getType(r[h-2],r[h])};break;case 26:this.$={id:r[h],descr:r[h],type:s.nodeType.DEFAULT};break;case 27:s.getLogger().trace("node found ..",r[h-3]),this.$={id:r[h-3],descr:r[h-1],type:s.getType(r[h-2],r[h])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:i,7:[1,10],9:9,12:11,13:n,14:14,15:r,16:o,17:17,18:18,19:h,22:c},t(a,[2,3]),{1:[2,2]},t(a,[2,4]),t(a,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,15:r,16:o,17:17,18:18,19:h,22:c},{6:i,9:22,12:11,13:n,14:14,15:r,16:o,17:17,18:18,19:h,22:c},{6:u,7:l,10:23,11:d},t(f,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:h,22:c}),t(f,[2,18]),t(f,[2,19]),t(f,[2,20]),t(f,[2,21]),t(f,[2,23]),t(f,[2,24]),t(f,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:l,10:32,11:d},{1:[2,7],6:i,12:21,13:n,14:14,15:r,16:o,17:17,18:18,19:h,22:c},t(p,[2,14],{7:m,11:g}),t(E,[2,8]),t(E,[2,9]),t(E,[2,10]),t(f,[2,15]),t(f,[2,16]),t(f,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:m,11:g}),t(E,[2,11]),t(E,[2,12]),{21:[1,37]},t(f,[2,25]),t(f,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:s(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:s(function(t){var e=this,i=[0],n=[],r=[null],o=[],h=this.table,c="",a=0,u=0,l=o.slice.call(arguments,1),d=Object.create(this.lexer),f={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(f.yy[p]=this.yy[p]);d.setInput(t,f.yy),f.yy.lexer=d,f.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var m=d.yylloc;o.push(m);var g=d.options&&d.options.ranges;function E(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,s(function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),s(E,"lex");for(var N,y,S,b,v,D,_,k,I={};;){if(y=i[i.length-1],this.defaultActions[y]?S=this.defaultActions[y]:(null==N&&(N=E()),S=h[y]&&h[y][N]),void 0===S||!S.length||!S[0]){var O="";for(v in k=[],h[y])this.terminals_[v]&&v>2&&k.push("'"+this.terminals_[v]+"'");O=d.showPosition?"Parse error on line "+(a+1)+":\n"+d.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[N]||N)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==N?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(O,{text:d.match,token:this.terminals_[N]||N,line:d.yylineno,loc:m,expected:k})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+N);switch(S[0]){case 1:i.push(N),r.push(d.yytext),o.push(d.yylloc),i.push(S[1]),N=null,u=d.yyleng,c=d.yytext,a=d.yylineno,m=d.yylloc;break;case 2:if(D=this.productions_[S[1]][1],I.$=r[r.length-D],I._$={first_line:o[o.length-(D||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(D||1)].first_column,last_column:o[o.length-1].last_column},g&&(I._$.range=[o[o.length-(D||1)].range[0],o[o.length-1].range[1]]),void 0!==(b=this.performAction.apply(I,[c,u,a,f.yy,S[1],r,o].concat(l))))return b;D&&(i=i.slice(0,-1*D*2),r=r.slice(0,-1*D),o=o.slice(0,-1*D)),i.push(this.productions_[S[1]][0]),r.push(I.$),o.push(I._$),_=h[i[i.length-2]][i[i.length-1]],i.push(_);break;case 3:return!0}}return!0},"parse")},y=function(){return{EOF:1,parseError:s(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:s(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:s(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===s.length?this.yylloc.first_column:0)+s[s.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:s(function(t){this.unput(this.match.slice(t))},"less"),pastInput:s(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:s(function(t,e){var i,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;var t,e,i,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((i=this._input.match(this.rules[n[r]]))&&(!e||i[0].length>e[0].length)){if(e=i,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var t=this.next();return t||this.lex()},"lex"),begin:s(function(t){this.conditionStack.push(t)},"begin"),popState:s(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:s(function(t){this.begin(t)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(t,e,i,s){switch(i){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function S(){this.yy={}}return N.lexer=y,s(S,"Parser"),S.prototype=N,N.Parser=S,new S}();y.parser=y;var S=y,b={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},v=(s(t=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=b,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(t){for(let e=this.nodes.length-1;e>=0;e--)if(this.nodes[e].level<t)return this.nodes[e];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(t,e,i,s){var r,o;n.info("addNode",t,e,i,s);let u=!1;0===this.nodes.length?(this.baseLevel=t,t=0,u=!0):void 0!==this.baseLevel&&(t-=this.baseLevel,u=!1);const l=c();let d=(null==(r=l.mindmap)?void 0:r.padding)??h.mindmap.padding;switch(s){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:d*=2}const f={id:this.count++,nodeId:a(e,l),level:t,descr:a(i,l),type:s,children:[],width:(null==(o=l.mindmap)?void 0:o.maxNodeWidth)??h.mindmap.maxNodeWidth,padding:d,isRoot:u},p=this.getParent(t);if(p)p.children.push(f),this.nodes.push(f);else{if(!u)throw new Error(`There can be only one root. No parent could be found for ("${f.descr}")`);this.nodes.push(f)}}getType(t,e){switch(n.debug("In get type",t,e),t){case"[":return this.nodeType.RECT;case"(":return")"===e?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(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;const e=c(),i=this.nodes[this.nodes.length-1];t.icon&&(i.icon=a(t.icon,e)),t.class&&(i.class=a(t.class,e))}type2Str(t){switch(t){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(t,e){if(0===t.level?t.section=void 0:t.section=e,t.children)for(const[i,s]of t.children.entries()){const n=0===t.level?i:e;this.assignSections(s,n)}}flattenNodes(t,e){const i=["mindmap-node"];!0===t.isRoot?i.push("section-root","section--1"):void 0!==t.section&&i.push(`section-${t.section}`),t.class&&i.push(t.class);const n=i.join(" "),r=s(t=>{switch(t){case b.CIRCLE:return"mindmapCircle";case b.RECT:return"rect";case b.ROUNDED_RECT:return"rounded";case b.CLOUD:return"cloud";case b.BANG:return"bang";case b.HEXAGON:return"hexagon";case b.DEFAULT:return"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),o={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,isGroup:!1,shape:r(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:n,cssStyles:[],look:"default",icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(e.push(o),t.children)for(const s of t.children)this.flattenNodes(s,e)}generateEdges(t,e){if(t.children)for(const i of t.children){let s="edge";void 0!==i.section&&(s+=` section-edge-${i.section}`);s+=` edge-depth-${t.level+1}`;const n={id:`edge_${t.id}_${i.id}`,start:t.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:s,depth:t.level,section:i.section};e.push(n),this.generateEdges(i,e)}}getData(){const t=this.getMindmap(),e=c(),i=e;if(void 0!==u().layout||(i.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:i};n.debug("getData: mindmapRoot",t,e),this.assignSections(t);const s=[],r=[];this.flattenNodes(t,s),this.generateEdges(t,r),n.debug(`getData: processed ${s.length} nodes and ${r.length} edges`);const o=new Map;for(const n of s)o.set(n.id,{shape:n.shape,width:n.width,height:n.height,padding:n.padding});return{nodes:s,edges:r,config:i,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(o),type:"mindmap",diagramId:"mindmap-"+N()}}getLogger(){return n}},"MindmapDB"),t),D={draw:s(async(t,s,c,a)=>{var u,l;n.debug("Rendering mindmap diagram\n"+t);const d=a.db,f=d.getData(),p=e(s,f.config.securityLevel);f.type=a.type,f.layoutAlgorithm=r(f.config.layout,{fallback:"cose-bilkent"}),f.diagramId=s;d.getMindmap()&&(f.nodes.forEach(t=>{"rounded"===t.shape?(t.radius=15,t.taper=15,t.stroke="none",t.width=0,t.padding=15):"circle"===t.shape?t.padding=10:"rect"===t.shape&&(t.width=0,t.padding=10)}),await o(f,p),i(p,(null==(u=f.config.mindmap)?void 0:u.padding)??h.mindmap.padding,"mindmapDiagram",(null==(l=f.config.mindmap)?void 0:l.useMaxWidth)??h.mindmap.useMaxWidth))},"draw")},_=s(t=>{let e="";for(let i=0;i<t.THEME_COLOR_LIMIT;i++)t["lineColor"+i]=t["lineColor"+i]||t["cScaleInv"+i],l(t["lineColor"+i])?t["lineColor"+i]=d(t["lineColor"+i],20):t["lineColor"+i]=f(t["lineColor"+i],20);for(let i=0;i<t.THEME_COLOR_LIMIT;i++){const s=""+(17-3*i);e+=`\n .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {\n fill: ${t["cScale"+i]};\n }\n .section-${i-1} text {\n fill: ${t["cScaleLabel"+i]};\n }\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+i]};\n }\n .section-edge-${i-1}{\n stroke: ${t["cScale"+i]};\n }\n .edge-depth-${i-1}{\n stroke-width: ${s};\n }\n .section-${i-1} line {\n stroke: ${t["cScaleInv"+i]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return e},"genSections"),k=s(t=>`\n .edge {\n stroke-width: 3;\n }\n ${_(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .section-root span {\n color: ${t.gitBranchLabel0};\n }\n .section-2 span {\n color: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`,"getStyles"),I={get db(){return new v},renderer:D,parser:S,styles:k};export{I as diagram};
|
|
1
|
+
var t;import{g as e}from"./chunk-55IACEB6-sCGtW4jw.js";import{s as i}from"./chunk-QN33PNHL-7lsjOUTT.js";import{_ as s,l as n,o as r,r as o,E as h,c,i as a,aC as u,W as l,X as d,Y as f}from"./index-30onxp6I.js";const p=[];for(let O=0;O<256;++O)p.push((O+256).toString(16).slice(1));let m;const g=new Uint8Array(16);const E={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function N(t,e,i){var s;if(E.randomUUID&&!t)return E.randomUUID();const n=(t=t||{}).random??(null==(s=t.rng)?void 0:s.call(t))??function(){if(!m){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");m=crypto.getRandomValues.bind(crypto)}return m(g)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=15&n[6]|64,n[8]=63&n[8]|128,function(t,e=0){return(p[t[e+0]]+p[t[e+1]]+p[t[e+2]]+p[t[e+3]]+"-"+p[t[e+4]]+p[t[e+5]]+"-"+p[t[e+6]]+p[t[e+7]]+"-"+p[t[e+8]]+p[t[e+9]]+"-"+p[t[e+10]]+p[t[e+11]]+p[t[e+12]]+p[t[e+13]]+p[t[e+14]]+p[t[e+15]]).toLowerCase()}(n)}var y=function(){var t=s(function(t,e,i,s){for(i=i||{},s=t.length;s--;i[t[s]]=e);return i},"o"),e=[1,4],i=[1,13],n=[1,12],r=[1,15],o=[1,16],h=[1,20],c=[1,19],a=[6,7,8],u=[1,26],l=[1,24],d=[1,25],f=[6,7,11],p=[1,6,13,15,16,19,22],m=[1,33],g=[1,34],E=[1,6,7,11,13,15,16,19,22],N={trace:s(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:s(function(t,e,i,s,n,r,o){var h=r.length-1;switch(n){case 6:case 7:return s;case 8:s.getLogger().trace("Stop NL ");break;case 9:s.getLogger().trace("Stop EOF ");break;case 11:s.getLogger().trace("Stop NL2 ");break;case 12:s.getLogger().trace("Stop EOF2 ");break;case 15:s.getLogger().info("Node: ",r[h].id),s.addNode(r[h-1].length,r[h].id,r[h].descr,r[h].type);break;case 16:s.getLogger().trace("Icon: ",r[h]),s.decorateNode({icon:r[h]});break;case 17:case 21:s.decorateNode({class:r[h]});break;case 18:s.getLogger().trace("SPACELIST");break;case 19:s.getLogger().trace("Node: ",r[h].id),s.addNode(0,r[h].id,r[h].descr,r[h].type);break;case 20:s.decorateNode({icon:r[h]});break;case 25:s.getLogger().trace("node found ..",r[h-2]),this.$={id:r[h-1],descr:r[h-1],type:s.getType(r[h-2],r[h])};break;case 26:this.$={id:r[h],descr:r[h],type:s.nodeType.DEFAULT};break;case 27:s.getLogger().trace("node found ..",r[h-3]),this.$={id:r[h-3],descr:r[h-1],type:s.getType(r[h-2],r[h])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:i,7:[1,10],9:9,12:11,13:n,14:14,15:r,16:o,17:17,18:18,19:h,22:c},t(a,[2,3]),{1:[2,2]},t(a,[2,4]),t(a,[2,5]),{1:[2,6],6:i,12:21,13:n,14:14,15:r,16:o,17:17,18:18,19:h,22:c},{6:i,9:22,12:11,13:n,14:14,15:r,16:o,17:17,18:18,19:h,22:c},{6:u,7:l,10:23,11:d},t(f,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:h,22:c}),t(f,[2,18]),t(f,[2,19]),t(f,[2,20]),t(f,[2,21]),t(f,[2,23]),t(f,[2,24]),t(f,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:l,10:32,11:d},{1:[2,7],6:i,12:21,13:n,14:14,15:r,16:o,17:17,18:18,19:h,22:c},t(p,[2,14],{7:m,11:g}),t(E,[2,8]),t(E,[2,9]),t(E,[2,10]),t(f,[2,15]),t(f,[2,16]),t(f,[2,17]),{20:[1,35]},{21:[1,36]},t(p,[2,13],{7:m,11:g}),t(E,[2,11]),t(E,[2,12]),{21:[1,37]},t(f,[2,25]),t(f,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:s(function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},"parseError"),parse:s(function(t){var e=this,i=[0],n=[],r=[null],o=[],h=this.table,c="",a=0,u=0,l=o.slice.call(arguments,1),d=Object.create(this.lexer),f={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(f.yy[p]=this.yy[p]);d.setInput(t,f.yy),f.yy.lexer=d,f.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var m=d.yylloc;o.push(m);var g=d.options&&d.options.ranges;function E(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,s(function(t){i.length=i.length-2*t,r.length=r.length-t,o.length=o.length-t},"popStack"),s(E,"lex");for(var N,y,S,b,v,D,_,k,I={};;){if(y=i[i.length-1],this.defaultActions[y]?S=this.defaultActions[y]:(null==N&&(N=E()),S=h[y]&&h[y][N]),void 0===S||!S.length||!S[0]){var O="";for(v in k=[],h[y])this.terminals_[v]&&v>2&&k.push("'"+this.terminals_[v]+"'");O=d.showPosition?"Parse error on line "+(a+1)+":\n"+d.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[N]||N)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==N?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(O,{text:d.match,token:this.terminals_[N]||N,line:d.yylineno,loc:m,expected:k})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+N);switch(S[0]){case 1:i.push(N),r.push(d.yytext),o.push(d.yylloc),i.push(S[1]),N=null,u=d.yyleng,c=d.yytext,a=d.yylineno,m=d.yylloc;break;case 2:if(D=this.productions_[S[1]][1],I.$=r[r.length-D],I._$={first_line:o[o.length-(D||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(D||1)].first_column,last_column:o[o.length-1].last_column},g&&(I._$.range=[o[o.length-(D||1)].range[0],o[o.length-1].range[1]]),void 0!==(b=this.performAction.apply(I,[c,u,a,f.yy,S[1],r,o].concat(l))))return b;D&&(i=i.slice(0,-1*D*2),r=r.slice(0,-1*D),o=o.slice(0,-1*D)),i.push(this.productions_[S[1]][0]),r.push(I.$),o.push(I._$),_=h[i[i.length-2]][i[i.length-1]],i.push(_);break;case 3:return!0}}return!0},"parse")},y=function(){return{EOF:1,parseError:s(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:s(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:s(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===s.length?this.yylloc.first_column:0)+s[s.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:s(function(t){this.unput(this.match.slice(t))},"less"),pastInput:s(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:s(function(t,e){var i,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;var t,e,i,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((i=this._input.match(this.rules[n[r]]))&&(!e||i[0].length>e[0].length)){if(e=i,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var t=this.next();return t||this.lex()},"lex"),begin:s(function(t){this.conditionStack.push(t)},"begin"),popState:s(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(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:s(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:s(function(t){this.begin(t)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(t,e,i,s){switch(i){case 0:return t.getLogger().trace("Found comment",e.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return t.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:t.getLogger().trace("end icon"),this.popState();break;case 10:return t.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return t.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return t.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 27:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return t.getLogger().trace("Long description:",e.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}}();function S(){this.yy={}}return N.lexer=y,s(S,"Parser"),S.prototype=N,N.Parser=S,new S}();y.parser=y;var S=y,b={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},v=(s(t=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=b,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(t){for(let e=this.nodes.length-1;e>=0;e--)if(this.nodes[e].level<t)return this.nodes[e];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(t,e,i,s){var r,o;n.info("addNode",t,e,i,s);let u=!1;0===this.nodes.length?(this.baseLevel=t,t=0,u=!0):void 0!==this.baseLevel&&(t-=this.baseLevel,u=!1);const l=c();let d=(null==(r=l.mindmap)?void 0:r.padding)??h.mindmap.padding;switch(s){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:d*=2}const f={id:this.count++,nodeId:a(e,l),level:t,descr:a(i,l),type:s,children:[],width:(null==(o=l.mindmap)?void 0:o.maxNodeWidth)??h.mindmap.maxNodeWidth,padding:d,isRoot:u},p=this.getParent(t);if(p)p.children.push(f),this.nodes.push(f);else{if(!u)throw new Error(`There can be only one root. No parent could be found for ("${f.descr}")`);this.nodes.push(f)}}getType(t,e){switch(n.debug("In get type",t,e),t){case"[":return this.nodeType.RECT;case"(":return")"===e?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(t,e){this.elements[t]=e}getElementById(t){return this.elements[t]}decorateNode(t){if(!t)return;const e=c(),i=this.nodes[this.nodes.length-1];t.icon&&(i.icon=a(t.icon,e)),t.class&&(i.class=a(t.class,e))}type2Str(t){switch(t){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(t,e){if(0===t.level?t.section=void 0:t.section=e,t.children)for(const[i,s]of t.children.entries()){const n=0===t.level?i:e;this.assignSections(s,n)}}flattenNodes(t,e){const i=["mindmap-node"];!0===t.isRoot?i.push("section-root","section--1"):void 0!==t.section&&i.push(`section-${t.section}`),t.class&&i.push(t.class);const n=i.join(" "),r=s(t=>{switch(t){case b.CIRCLE:return"mindmapCircle";case b.RECT:return"rect";case b.ROUNDED_RECT:return"rounded";case b.CLOUD:return"cloud";case b.BANG:return"bang";case b.HEXAGON:return"hexagon";case b.DEFAULT:return"defaultMindmapNode";default:return"rect"}},"getShapeFromType"),o={id:t.id.toString(),domId:"node_"+t.id.toString(),label:t.descr,isGroup:!1,shape:r(t.type),width:t.width,height:t.height??0,padding:t.padding,cssClasses:n,cssStyles:[],look:"default",icon:t.icon,x:t.x,y:t.y,level:t.level,nodeId:t.nodeId,type:t.type,section:t.section};if(e.push(o),t.children)for(const s of t.children)this.flattenNodes(s,e)}generateEdges(t,e){if(t.children)for(const i of t.children){let s="edge";void 0!==i.section&&(s+=` section-edge-${i.section}`);s+=` edge-depth-${t.level+1}`;const n={id:`edge_${t.id}_${i.id}`,start:t.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:"default",classes:s,depth:t.level,section:i.section};e.push(n),this.generateEdges(i,e)}}getData(){const t=this.getMindmap(),e=c(),i=e;if(void 0!==u().layout||(i.layout="cose-bilkent"),!t)return{nodes:[],edges:[],config:i};n.debug("getData: mindmapRoot",t,e),this.assignSections(t);const s=[],r=[];this.flattenNodes(t,s),this.generateEdges(t,r),n.debug(`getData: processed ${s.length} nodes and ${r.length} edges`);const o=new Map;for(const n of s)o.set(n.id,{shape:n.shape,width:n.width,height:n.height,padding:n.padding});return{nodes:s,edges:r,config:i,rootNode:t,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(o),type:"mindmap",diagramId:"mindmap-"+N()}}getLogger(){return n}},"MindmapDB"),t),D={draw:s(async(t,s,c,a)=>{var u,l;n.debug("Rendering mindmap diagram\n"+t);const d=a.db,f=d.getData(),p=e(s,f.config.securityLevel);f.type=a.type,f.layoutAlgorithm=r(f.config.layout,{fallback:"cose-bilkent"}),f.diagramId=s;d.getMindmap()&&(f.nodes.forEach(t=>{"rounded"===t.shape?(t.radius=15,t.taper=15,t.stroke="none",t.width=0,t.padding=15):"circle"===t.shape?t.padding=10:"rect"===t.shape&&(t.width=0,t.padding=10)}),await o(f,p),i(p,(null==(u=f.config.mindmap)?void 0:u.padding)??h.mindmap.padding,"mindmapDiagram",(null==(l=f.config.mindmap)?void 0:l.useMaxWidth)??h.mindmap.useMaxWidth))},"draw")},_=s(t=>{let e="";for(let i=0;i<t.THEME_COLOR_LIMIT;i++)t["lineColor"+i]=t["lineColor"+i]||t["cScaleInv"+i],l(t["lineColor"+i])?t["lineColor"+i]=d(t["lineColor"+i],20):t["lineColor"+i]=f(t["lineColor"+i],20);for(let i=0;i<t.THEME_COLOR_LIMIT;i++){const s=""+(17-3*i);e+=`\n .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {\n fill: ${t["cScale"+i]};\n }\n .section-${i-1} text {\n fill: ${t["cScaleLabel"+i]};\n }\n .node-icon-${i-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+i]};\n }\n .section-edge-${i-1}{\n stroke: ${t["cScale"+i]};\n }\n .edge-depth-${i-1}{\n stroke-width: ${s};\n }\n .section-${i-1} line {\n stroke: ${t["cScaleInv"+i]} ;\n stroke-width: 3;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return e},"genSections"),k=s(t=>`\n .edge {\n stroke-width: 3;\n }\n ${_(t)}\n .section-root rect, .section-root path, .section-root circle, .section-root polygon {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .section-root span {\n color: ${t.gitBranchLabel0};\n }\n .section-2 span {\n color: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .mindmap-node-label {\n dy: 1em;\n alignment-baseline: middle;\n text-anchor: middle;\n dominant-baseline: middle;\n text-align: center;\n }\n`,"getStyles"),I={get db(){return new v},renderer:D,parser:S,styles:k};export{I as diagram};
|
package/dist/clients/web/assets/{pieDiagram-ADFJNKIX-D-XXo3zP.js → pieDiagram-ADFJNKIX-DITjn_1i.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ab as t,a3 as e,aB as n,g as a,s as r,a as i,b as s,q as l,p as o,_ as c,l as u,c as f,D as p,H as d,N as h,e as m,y as g,E as w}from"./index-
|
|
1
|
+
import{ab as t,a3 as e,aB as n,g as a,s as r,a as i,b as s,q as l,p as o,_ as c,l as u,c as f,D as p,H as d,N as h,e as m,y as g,E as w}from"./index-30onxp6I.js";import{p as $}from"./chunk-4BX2VUAB-DdM_Xgvz.js";import{p as y}from"./treemap-KMMF4GRG-Do7kW41s.js";import{d as x}from"./arc-C01cHi_J.js";import{o as v}from"./ordinal-2upbOM02.js";import"./min-BcFr1Xgw.js";import"./_baseUniq-BbAI5D6T.js";import"./init-C9Lo50Hz.js";function A(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function b(t){return t}var D=w.pie,S={sections:new Map,showData:!1},M=S.sections,j=S.showData,C=structuredClone(D),T={getConfig:c(()=>structuredClone(C),"getConfig"),clear:c(()=>{M=new Map,j=S.showData,g()},"clear"),setDiagramTitle:o,getDiagramTitle:l,setAccTitle:s,getAccTitle:i,setAccDescription:r,getAccDescription:a,addSection:c(({label:t,value:e})=>{if(e<0)throw new Error(`"${t}" has invalid value: ${e}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);M.has(t)||(M.set(t,e),u.debug(`added new section: ${t}, with value: ${e}`))},"addSection"),getSections:c(()=>M,"getSections"),setShowData:c(t=>{j=t},"setShowData"),getShowData:c(()=>j,"getShowData")},k=c((t,e)=>{$(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),B={parse:c(async t=>{const e=await y("pie",t);u.debug(e),k(e,T)},"parse")},N=c(t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${t.pieOuterStrokeColor};\n stroke-width: ${t.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`,"getStyles"),z=c(a=>{const r=[...a.values()].reduce((t,e)=>t+e,0),i=[...a.entries()].map(([t,e])=>({label:t,value:e})).filter(t=>t.value/r*100>=1).sort((t,e)=>e.value-t.value),s=function(){var a=b,r=A,i=null,s=t(0),l=t(e),o=t(0);function c(t){var c,u,f,p,d,h=(t=n(t)).length,m=0,g=new Array(h),w=new Array(h),$=+s.apply(this,arguments),y=Math.min(e,Math.max(-e,l.apply(this,arguments)-$)),x=Math.min(Math.abs(y)/h,o.apply(this,arguments)),v=x*(y<0?-1:1);for(c=0;c<h;++c)(d=w[g[c]=c]=+a(t[c],c,t))>0&&(m+=d);for(null!=r?g.sort(function(t,e){return r(w[t],w[e])}):null!=i&&g.sort(function(e,n){return i(t[e],t[n])}),c=0,f=m?(y-h*v)/m:0;c<h;++c,$=p)u=g[c],p=$+((d=w[u])>0?d*f:0)+v,w[u]={data:t[u],index:c,value:d,startAngle:$,endAngle:p,padAngle:x};return w}return c.value=function(e){return arguments.length?(a="function"==typeof e?e:t(+e),c):a},c.sortValues=function(t){return arguments.length?(r=t,i=null,c):r},c.sort=function(t){return arguments.length?(i=t,r=null,c):i},c.startAngle=function(e){return arguments.length?(s="function"==typeof e?e:t(+e),c):s},c.endAngle=function(e){return arguments.length?(l="function"==typeof e?e:t(+e),c):l},c.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:t(+e),c):o},c}().value(t=>t.value);return s(i)},"createPieArcs"),E={parser:B,db:T,renderer:{draw:c((t,e,n,a)=>{u.debug("rendering pie chart\n"+t);const r=a.db,i=f(),s=p(r.getConfig(),i.pie),l=18,o=450,c=o,g=d(e),w=g.append("g");w.attr("transform","translate(225,225)");const{themeVariables:$}=i;let[y]=h($.pieOuterStrokeWidth);y??(y=2);const A=s.textPosition,b=Math.min(c,o)/2-40,D=x().innerRadius(0).outerRadius(b),S=x().innerRadius(b*A).outerRadius(b*A);w.append("circle").attr("cx",0).attr("cy",0).attr("r",b+y/2).attr("class","pieOuterCircle");const M=r.getSections(),j=z(M),C=[$.pie1,$.pie2,$.pie3,$.pie4,$.pie5,$.pie6,$.pie7,$.pie8,$.pie9,$.pie10,$.pie11,$.pie12];let T=0;M.forEach(t=>{T+=t});const k=j.filter(t=>"0"!==(t.data.value/T*100).toFixed(0)),B=v(C);w.selectAll("mySlices").data(k).enter().append("path").attr("d",D).attr("fill",t=>B(t.data.label)).attr("class","pieCircle"),w.selectAll("mySlices").data(k).enter().append("text").text(t=>(t.data.value/T*100).toFixed(0)+"%").attr("transform",t=>"translate("+S.centroid(t)+")").style("text-anchor","middle").attr("class","slice"),w.append("text").text(r.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");const N=[...M.entries()].map(([t,e])=>({label:t,value:e})),E=w.selectAll(".legend").data(N).enter().append("g").attr("class","legend").attr("transform",(t,e)=>"translate(216,"+(22*e-22*N.length/2)+")");E.append("rect").attr("width",l).attr("height",l).style("fill",t=>B(t.label)).style("stroke",t=>B(t.label)),E.append("text").attr("x",22).attr("y",14).text(t=>r.getShowData()?`${t.label} [${t.value}]`:t.label);const q=512+Math.max(...E.selectAll("text").nodes().map(t=>(null==t?void 0:t.getBoundingClientRect().width)??0));g.attr("viewBox",`0 0 ${q} 450`),m(g,o,q,s.useMaxWidth)},"draw")},styles:N};export{E as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t,i;import{s as e,g as s,q as a,p as n,a as r,b as h,_ as o,c as l,l as c,d as u,e as d,y as x,E as f,i as p,K as T}from"./index-B5OdXvjH.js";import{l as _}from"./linear-Cj0itOnY.js";import"./init-C9Lo50Hz.js";import"./defaultLocale-DK_abR1s.js";var v=function(){var t=o(function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},"o"),i=[1,3],e=[1,4],s=[1,5],a=[1,6],n=[1,7],r=[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],h=[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],l=[55,56,57],c=[2,36],u=[1,37],d=[1,36],x=[1,38],f=[1,35],p=[1,43],T=[1,41],_=[1,14],v=[1,23],g=[1,18],A=[1,19],m=[1,20],q=[1,21],y=[1,22],S=[1,24],k=[1,25],b=[1,26],P=[1,27],E=[1,28],F=[1,29],D=[1,32],I=[1,33],w=[1,34],L=[1,39],N=[1,40],z=[1,42],R=[1,44],U=[1,62],C=[1,61],O=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Q=[1,65],W=[1,66],H=[1,67],M=[1,68],X=[1,69],B=[1,70],$=[1,71],Y=[1,72],j=[1,73],K=[1,74],G=[1,75],V=[1,76],Z=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],tt=[1,91],it=[1,92],et=[1,99],st=[1,93],at=[1,96],nt=[1,94],rt=[1,95],ht=[1,97],ot=[1,98],lt=[1,102],ct=[10,55,56,57],ut=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],dt={trace:o(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:o(function(t,i,e,s,a,n,r){var h=n.length-1;switch(a){case 23:case 68:this.$=n[h];break;case 24:case 69:this.$=n[h-1]+""+n[h];break;case 26:this.$=n[h-1]+n[h];break;case 27:this.$=[n[h].trim()];break;case 28:n[h-2].push(n[h].trim()),this.$=n[h-2];break;case 29:this.$=n[h-4],s.addClass(n[h-2],n[h]);break;case 37:this.$=[];break;case 42:this.$=n[h].trim(),s.setDiagramTitle(this.$);break;case 43:this.$=n[h].trim(),s.setAccTitle(this.$);break;case 44:case 45:this.$=n[h].trim(),s.setAccDescription(this.$);break;case 46:s.addSection(n[h].substr(8)),this.$=n[h].substr(8);break;case 47:s.addPoint(n[h-3],"",n[h-1],n[h],[]);break;case 48:s.addPoint(n[h-4],n[h-3],n[h-1],n[h],[]);break;case 49:s.addPoint(n[h-4],"",n[h-2],n[h-1],n[h]);break;case 50:s.addPoint(n[h-5],n[h-4],n[h-2],n[h-1],n[h]);break;case 51:s.setXAxisLeftText(n[h-2]),s.setXAxisRightText(n[h]);break;case 52:n[h-1].text+=" ⟶ ",s.setXAxisLeftText(n[h-1]);break;case 53:s.setXAxisLeftText(n[h]);break;case 54:s.setYAxisBottomText(n[h-2]),s.setYAxisTopText(n[h]);break;case 55:n[h-1].text+=" ⟶ ",s.setYAxisBottomText(n[h-1]);break;case 56:s.setYAxisBottomText(n[h]);break;case 57:s.setQuadrant1Text(n[h]);break;case 58:s.setQuadrant2Text(n[h]);break;case 59:s.setQuadrant3Text(n[h]);break;case 60:s.setQuadrant4Text(n[h]);break;case 64:case 66:this.$={text:n[h],type:"text"};break;case 65:this.$={text:n[h-1].text+""+n[h],type:n[h-1].type};break;case 67:this.$={text:n[h],type:"markdown"}}},"anonymous"),table:[{18:i,26:1,27:2,28:e,55:s,56:a,57:n},{1:[3]},{18:i,26:8,27:2,28:e,55:s,56:a,57:n},{18:i,26:9,27:2,28:e,55:s,56:a,57:n},t(r,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(l,c,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:u,5:d,10:x,12:f,13:p,14:T,18:_,25:v,35:g,37:A,39:m,41:q,42:y,48:S,50:k,51:b,52:P,53:E,54:F,60:D,61:I,63:w,64:L,65:N,66:z,67:R}),t(r,[2,34]),{27:45,55:s,56:a,57:n},t(l,[2,37]),t(l,c,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:u,5:d,10:x,12:f,13:p,14:T,18:_,25:v,35:g,37:A,39:m,41:q,42:y,48:S,50:k,51:b,52:P,53:E,54:F,60:D,61:I,63:w,64:L,65:N,66:z,67:R}),t(l,[2,39]),t(l,[2,40]),t(l,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(l,[2,45]),t(l,[2,46]),{18:[1,50]},{4:u,5:d,10:x,12:f,13:p,14:T,43:51,58:31,60:D,61:I,63:w,64:L,65:N,66:z,67:R},{4:u,5:d,10:x,12:f,13:p,14:T,43:52,58:31,60:D,61:I,63:w,64:L,65:N,66:z,67:R},{4:u,5:d,10:x,12:f,13:p,14:T,43:53,58:31,60:D,61:I,63:w,64:L,65:N,66:z,67:R},{4:u,5:d,10:x,12:f,13:p,14:T,43:54,58:31,60:D,61:I,63:w,64:L,65:N,66:z,67:R},{4:u,5:d,10:x,12:f,13:p,14:T,43:55,58:31,60:D,61:I,63:w,64:L,65:N,66:z,67:R},{4:u,5:d,10:x,12:f,13:p,14:T,43:56,58:31,60:D,61:I,63:w,64:L,65:N,66:z,67:R},{4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,44:[1,57],47:[1,58],58:60,59:59,63:w,64:L,65:N,66:z,67:R},t(O,[2,64]),t(O,[2,66]),t(O,[2,67]),t(O,[2,70]),t(O,[2,71]),t(O,[2,72]),t(O,[2,73]),t(O,[2,74]),t(O,[2,75]),t(O,[2,76]),t(O,[2,77]),t(O,[2,78]),t(O,[2,79]),t(O,[2,80]),t(r,[2,35]),t(l,[2,38]),t(l,[2,42]),t(l,[2,43]),t(l,[2,44]),{3:64,4:Q,5:W,6:H,7:M,8:X,9:B,10:$,11:Y,12:j,13:K,14:G,15:V,21:63},t(l,[2,53],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,49:[1,77],63:w,64:L,65:N,66:z,67:R}),t(l,[2,56],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,49:[1,78],63:w,64:L,65:N,66:z,67:R}),t(l,[2,57],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,63:w,64:L,65:N,66:z,67:R}),t(l,[2,58],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,63:w,64:L,65:N,66:z,67:R}),t(l,[2,59],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,63:w,64:L,65:N,66:z,67:R}),t(l,[2,60],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,63:w,64:L,65:N,66:z,67:R}),{45:[1,79]},{44:[1,80]},t(O,[2,65]),t(O,[2,81]),t(O,[2,82]),t(O,[2,83]),{3:82,4:Q,5:W,6:H,7:M,8:X,9:B,10:$,11:Y,12:j,13:K,14:G,15:V,18:[1,81]},t(Z,[2,23]),t(Z,[2,1]),t(Z,[2,2]),t(Z,[2,3]),t(Z,[2,4]),t(Z,[2,5]),t(Z,[2,6]),t(Z,[2,7]),t(Z,[2,8]),t(Z,[2,9]),t(Z,[2,10]),t(Z,[2,11]),t(Z,[2,12]),t(l,[2,52],{58:31,43:83,4:u,5:d,10:x,12:f,13:p,14:T,60:D,61:I,63:w,64:L,65:N,66:z,67:R}),t(l,[2,55],{58:31,43:84,4:u,5:d,10:x,12:f,13:p,14:T,60:D,61:I,63:w,64:L,65:N,66:z,67:R}),{46:[1,85]},{45:[1,86]},{4:J,5:tt,6:it,8:et,11:st,13:at,16:89,17:nt,18:rt,19:ht,20:ot,22:88,23:87},t(Z,[2,24]),t(l,[2,51],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,63:w,64:L,65:N,66:z,67:R}),t(l,[2,54],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,63:w,64:L,65:N,66:z,67:R}),t(l,[2,47],{22:88,16:89,23:100,4:J,5:tt,6:it,8:et,11:st,13:at,17:nt,18:rt,19:ht,20:ot}),{46:[1,101]},t(l,[2,29],{10:lt}),t(ct,[2,27],{16:103,4:J,5:tt,6:it,8:et,11:st,13:at,17:nt,18:rt,19:ht,20:ot}),t(ut,[2,25]),t(ut,[2,13]),t(ut,[2,14]),t(ut,[2,15]),t(ut,[2,16]),t(ut,[2,17]),t(ut,[2,18]),t(ut,[2,19]),t(ut,[2,20]),t(ut,[2,21]),t(ut,[2,22]),t(l,[2,49],{10:lt}),t(l,[2,48],{22:88,16:89,23:104,4:J,5:tt,6:it,8:et,11:st,13:at,17:nt,18:rt,19:ht,20:ot}),{4:J,5:tt,6:it,8:et,11:st,13:at,16:89,17:nt,18:rt,19:ht,20:ot,22:105},t(ut,[2,26]),t(l,[2,50],{10:lt}),t(ct,[2,28],{16:103,4:J,5:tt,6:it,8:et,11:st,13:at,17:nt,18:rt,19:ht,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:o(function(t){var i=this,e=[0],s=[],a=[null],n=[],r=this.table,h="",l=0,c=0,u=n.slice.call(arguments,1),d=Object.create(this.lexer),x={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(x.yy[f]=this.yy[f]);d.setInput(t,x.yy),x.yy.lexer=d,x.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var p=d.yylloc;n.push(p);var T=d.options&&d.options.ranges;function _(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof x.yy.parseError?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),o(_,"lex");for(var v,g,A,m,q,y,S,k,b={};;){if(g=e[e.length-1],this.defaultActions[g]?A=this.defaultActions[g]:(null==v&&(v=_()),A=r[g]&&r[g][v]),void 0===A||!A.length||!A[0]){var P="";for(q in k=[],r[g])this.terminals_[q]&&q>2&&k.push("'"+this.terminals_[q]+"'");P=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==v?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(P,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:p,expected:k})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+v);switch(A[0]){case 1:e.push(v),a.push(d.yytext),n.push(d.yylloc),e.push(A[1]),v=null,c=d.yyleng,h=d.yytext,l=d.yylineno,p=d.yylloc;break;case 2:if(y=this.productions_[A[1]][1],b.$=a[a.length-y],b._$={first_line:n[n.length-(y||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(y||1)].first_column,last_column:n[n.length-1].last_column},T&&(b._$.range=[n[n.length-(y||1)].range[0],n[n.length-1].range[1]]),void 0!==(m=this.performAction.apply(b,[h,c,l,x.yy,A[1],a,n].concat(u))))return m;y&&(e=e.slice(0,-1*y*2),a=a.slice(0,-1*y),n=n.slice(0,-1*y)),e.push(this.productions_[A[1]][0]),a.push(b.$),n.push(b._$),S=r[e[e.length-2]][e[e.length-1]],e.push(S);break;case 3:return!0}}return!0},"parse")},xt=function(){return{EOF:1,parseError:o(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:o(function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:o(function(t,i){var e,s,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length;n++)if((e=this._input.match(this.rules[a[n]]))&&(!i||e[0].length>i[0].length)){if(i=e,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,a[n])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,a[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var t=this.next();return t||this.lex()},"lex"),begin:o(function(t){this.conditionStack.push(t)},"begin"),popState:o(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(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:o(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:o(function(t){this.begin(t)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(t,i,e,s){switch(e){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}}();function ft(){this.yy={}}return dt.lexer=xt,o(ft,"Parser"),ft.prototype=dt,dt.Parser=ft,new ft}();v.parser=v;var g=v,A=T(),m=(o(t=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var t,i,e,s,a,n,r,h,o,l,c,u,d,x,p,T,_,v;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:(null==(t=f.quadrantChart)?void 0:t.chartWidth)||500,chartWidth:(null==(i=f.quadrantChart)?void 0:i.chartHeight)||500,titlePadding:(null==(e=f.quadrantChart)?void 0:e.titlePadding)||10,titleFontSize:(null==(s=f.quadrantChart)?void 0:s.titleFontSize)||20,quadrantPadding:(null==(a=f.quadrantChart)?void 0:a.quadrantPadding)||5,xAxisLabelPadding:(null==(n=f.quadrantChart)?void 0:n.xAxisLabelPadding)||5,yAxisLabelPadding:(null==(r=f.quadrantChart)?void 0:r.yAxisLabelPadding)||5,xAxisLabelFontSize:(null==(h=f.quadrantChart)?void 0:h.xAxisLabelFontSize)||16,yAxisLabelFontSize:(null==(o=f.quadrantChart)?void 0:o.yAxisLabelFontSize)||16,quadrantLabelFontSize:(null==(l=f.quadrantChart)?void 0:l.quadrantLabelFontSize)||16,quadrantTextTopPadding:(null==(c=f.quadrantChart)?void 0:c.quadrantTextTopPadding)||5,pointTextPadding:(null==(u=f.quadrantChart)?void 0:u.pointTextPadding)||5,pointLabelFontSize:(null==(d=f.quadrantChart)?void 0:d.pointLabelFontSize)||12,pointRadius:(null==(x=f.quadrantChart)?void 0:x.pointRadius)||5,xAxisPosition:(null==(p=f.quadrantChart)?void 0:p.xAxisPosition)||"top",yAxisPosition:(null==(T=f.quadrantChart)?void 0:T.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:(null==(_=f.quadrantChart)?void 0:_.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:(null==(v=f.quadrantChart)?void 0:v.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:A.quadrant1Fill,quadrant2Fill:A.quadrant2Fill,quadrant3Fill:A.quadrant3Fill,quadrant4Fill:A.quadrant4Fill,quadrant1TextFill:A.quadrant1TextFill,quadrant2TextFill:A.quadrant2TextFill,quadrant3TextFill:A.quadrant3TextFill,quadrant4TextFill:A.quadrant4TextFill,quadrantPointFill:A.quadrantPointFill,quadrantPointTextFill:A.quadrantPointTextFill,quadrantXAxisTextFill:A.quadrantXAxisTextFill,quadrantYAxisTextFill:A.quadrantYAxisTextFill,quadrantTitleFill:A.quadrantTitleFill,quadrantInternalBorderStrokeFill:A.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:A.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,c.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,i){this.classes.set(t,i)}setConfig(t){c.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){c.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,i,e,s){const a=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,n={top:"top"===t&&i?a:0,bottom:"bottom"===t&&i?a:0},r=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,h={left:"left"===this.config.yAxisPosition&&e?r:0,right:"right"===this.config.yAxisPosition&&e?r:0},o=this.config.titleFontSize+2*this.config.titlePadding,l={top:s?o:0},c=this.config.quadrantPadding+h.left,u=this.config.quadrantPadding+n.top+l.top,d=this.config.chartWidth-2*this.config.quadrantPadding-h.left-h.right,x=this.config.chartHeight-2*this.config.quadrantPadding-n.top-n.bottom-l.top;return{xAxisSpace:n,yAxisSpace:h,titleSpace:l,quadrantSpace:{quadrantLeft:c,quadrantTop:u,quadrantWidth:d,quadrantHalfWidth:d/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,i,e,s){const{quadrantSpace:a,titleSpace:n}=s,{quadrantHalfHeight:r,quadrantHeight:h,quadrantLeft:o,quadrantHalfWidth:l,quadrantTop:c,quadrantWidth:u}=a,d=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),f=[];return this.data.xAxisLeftText&&i&&f.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:o+(d?l/2:0),y:"top"===t?this.config.xAxisLabelPadding+n.top:this.config.xAxisLabelPadding+c+h+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&i&&f.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:o+l+(d?l/2:0),y:"top"===t?this.config.xAxisLabelPadding+n.top:this.config.xAxisLabelPadding+c+h+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&e&&f.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+o+u+this.config.quadrantPadding,y:c+h-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&e&&f.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+o+u+this.config.quadrantPadding,y:c+r-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),f}getQuadrants(t){const{quadrantSpace:i}=t,{quadrantHalfHeight:e,quadrantLeft:s,quadrantHalfWidth:a,quadrantTop:n}=i,r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:s+a,y:n,width:a,height:e,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:s,y:n,width:a,height:e,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:s,y:n+e,width:a,height:e,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:s+a,y:n+e,width:a,height:e,fill:this.themeConfig.quadrant4Fill}];for(const h of r)h.text.x=h.x+h.width/2,0===this.data.points.length?(h.text.y=h.y+h.height/2,h.text.horizontalPos="middle"):(h.text.y=h.y+this.config.quadrantTextTopPadding,h.text.horizontalPos="top");return r}getQuadrantPoints(t){const{quadrantSpace:i}=t,{quadrantHeight:e,quadrantLeft:s,quadrantTop:a,quadrantWidth:n}=i,r=_().domain([0,1]).range([s,n+s]),h=_().domain([0,1]).range([e+a,a]);return this.data.points.map(t=>{const i=this.classes.get(t.className);i&&(t={...i,...t});return{x:r(t.x),y:h(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:r(t.x),y:h(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){const i=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:e}=t,{quadrantHalfHeight:s,quadrantHeight:a,quadrantLeft:n,quadrantHalfWidth:r,quadrantTop:h,quadrantWidth:o}=e;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-i,y1:h,x2:n+o+i,y2:h},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n+o,y1:h+i,x2:n+o,y2:h+a-i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-i,y1:h+a,x2:n+o+i,y2:h+a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n,y1:h+i,x2:n,y2:h+a-i},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+r,y1:h+i,x2:n+r,y2:h+a-i},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+i,y1:h+s,x2:n+o-i,y2:h+s}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),i=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),e=this.config.showTitle&&!!this.data.titleText,s=this.data.points.length>0?"bottom":this.config.xAxisPosition,a=this.calculateSpace(s,t,i,e);return{points:this.getQuadrantPoints(a),quadrants:this.getQuadrants(a),axisLabels:this.getAxisLabels(s,t,i,a),borderLines:this.getBorders(a),title:this.getTitle(e)}}},"QuadrantBuilder"),t),q=(i=class extends Error{constructor(t,i,e){super(`value for ${t} ${i} is invalid, please use a valid ${e}`),this.name="InvalidStyleError"}},o(i,"InvalidStyleError"),i);function y(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function S(t){return!/^\d+$/.test(t)}function k(t){return!/^\d+px$/.test(t)}o(y,"validateHexCode"),o(S,"validateNumber"),o(k,"validateSizeInPixels");var b=l();function P(t){return p(t.trim(),b)}o(P,"textSanitizer");var E=new m;function F(t){E.setData({quadrant1Text:P(t.text)})}function D(t){E.setData({quadrant2Text:P(t.text)})}function I(t){E.setData({quadrant3Text:P(t.text)})}function w(t){E.setData({quadrant4Text:P(t.text)})}function L(t){E.setData({xAxisLeftText:P(t.text)})}function N(t){E.setData({xAxisRightText:P(t.text)})}function z(t){E.setData({yAxisTopText:P(t.text)})}function R(t){E.setData({yAxisBottomText:P(t.text)})}function U(t){const i={};for(const e of t){const[t,s]=e.trim().split(/\s*:\s*/);if("radius"===t){if(S(s))throw new q(t,s,"number");i.radius=parseInt(s)}else if("color"===t){if(y(s))throw new q(t,s,"hex code");i.color=s}else if("stroke-color"===t){if(y(s))throw new q(t,s,"hex code");i.strokeColor=s}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(k(s))throw new q(t,s,"number of pixels (eg. 10px)");i.strokeWidth=s}}return i}function C(t,i,e,s,a){const n=U(a);E.addPoints([{x:e,y:s,text:P(t.text),className:i,...n}])}function O(t,i){E.addClass(t,U(i))}function Q(t){E.setConfig({chartWidth:t})}function W(t){E.setConfig({chartHeight:t})}function H(){const t=l(),{themeVariables:i,quadrantChart:e}=t;return e&&E.setConfig(e),E.setThemeConfig({quadrant1Fill:i.quadrant1Fill,quadrant2Fill:i.quadrant2Fill,quadrant3Fill:i.quadrant3Fill,quadrant4Fill:i.quadrant4Fill,quadrant1TextFill:i.quadrant1TextFill,quadrant2TextFill:i.quadrant2TextFill,quadrant3TextFill:i.quadrant3TextFill,quadrant4TextFill:i.quadrant4TextFill,quadrantPointFill:i.quadrantPointFill,quadrantPointTextFill:i.quadrantPointTextFill,quadrantXAxisTextFill:i.quadrantXAxisTextFill,quadrantYAxisTextFill:i.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:i.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:i.quadrantInternalBorderStrokeFill,quadrantTitleFill:i.quadrantTitleFill}),E.setData({titleText:a()}),E.build()}o(F,"setQuadrant1Text"),o(D,"setQuadrant2Text"),o(I,"setQuadrant3Text"),o(w,"setQuadrant4Text"),o(L,"setXAxisLeftText"),o(N,"setXAxisRightText"),o(z,"setYAxisTopText"),o(R,"setYAxisBottomText"),o(U,"parseStyles"),o(C,"addPoint"),o(O,"addClass"),o(Q,"setWidth"),o(W,"setHeight"),o(H,"getQuadrantData");var M={parser:g,db:{setWidth:Q,setHeight:W,setQuadrant1Text:F,setQuadrant2Text:D,setQuadrant3Text:I,setQuadrant4Text:w,setXAxisLeftText:L,setXAxisRightText:N,setYAxisTopText:z,setYAxisBottomText:R,parseStyles:U,addPoint:C,addClass:O,getQuadrantData:H,clear:o(function(){E.clear(),x()},"clear"),setAccTitle:h,getAccTitle:r,setDiagramTitle:n,getDiagramTitle:a,getAccDescription:s,setAccDescription:e},renderer:{draw:o((t,i,e,s)=>{var a,n,r;function h(t){return"top"===t?"hanging":"middle"}function x(t){return"left"===t?"start":"middle"}function f(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}o(h,"getDominantBaseLine"),o(x,"getTextAnchor"),o(f,"getTransformation");const p=l();c.debug("Rendering quadrant chart\n"+t);const T=p.securityLevel;let _;"sandbox"===T&&(_=u("#i"+i));const v=u("sandbox"===T?_.nodes()[0].contentDocument.body:"body").select(`[id="${i}"]`),g=v.append("g").attr("class","main"),A=(null==(a=p.quadrantChart)?void 0:a.chartWidth)??500,m=(null==(n=p.quadrantChart)?void 0:n.chartHeight)??500;d(v,m,A,(null==(r=p.quadrantChart)?void 0:r.useMaxWidth)??!0),v.attr("viewBox","0 0 "+A+" "+m),s.db.setHeight(m),s.db.setWidth(A);const q=s.db.getQuadrantData(),y=g.append("g").attr("class","quadrants"),S=g.append("g").attr("class","border"),k=g.append("g").attr("class","data-points"),b=g.append("g").attr("class","labels"),P=g.append("g").attr("class","title");q.title&&P.append("text").attr("x",0).attr("y",0).attr("fill",q.title.fill).attr("font-size",q.title.fontSize).attr("dominant-baseline",h(q.title.horizontalPos)).attr("text-anchor",x(q.title.verticalPos)).attr("transform",f(q.title)).text(q.title.text),q.borderLines&&S.selectAll("line").data(q.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth);const E=y.selectAll("g.quadrant").data(q.quadrants).enter().append("g").attr("class","quadrant");E.append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),E.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>h(t.text.horizontalPos)).attr("text-anchor",t=>x(t.text.verticalPos)).attr("transform",t=>f(t.text)).text(t=>t.text.text);b.selectAll("g.label").data(q.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>h(t.horizontalPos)).attr("text-anchor",t=>x(t.verticalPos)).attr("transform",t=>f(t));const F=k.selectAll("g.data-point").data(q.points).enter().append("g").attr("class","data-point");F.append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),F.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>h(t.text.horizontalPos)).attr("text-anchor",t=>x(t.text.verticalPos)).attr("transform",t=>f(t.text))},"draw")},styles:o(()=>"","styles")};export{M as diagram};
|
|
1
|
+
var t,i;import{s as e,g as s,q as a,p as n,a as r,b as h,_ as o,c as l,l as c,d as u,e as d,y as x,E as f,i as p,K as T}from"./index-30onxp6I.js";import{l as _}from"./linear-VOTetRqU.js";import"./init-C9Lo50Hz.js";import"./defaultLocale-DK_abR1s.js";var v=function(){var t=o(function(t,i,e,s){for(e=e||{},s=t.length;s--;e[t[s]]=i);return e},"o"),i=[1,3],e=[1,4],s=[1,5],a=[1,6],n=[1,7],r=[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],h=[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],l=[55,56,57],c=[2,36],u=[1,37],d=[1,36],x=[1,38],f=[1,35],p=[1,43],T=[1,41],_=[1,14],v=[1,23],g=[1,18],A=[1,19],m=[1,20],q=[1,21],y=[1,22],S=[1,24],k=[1,25],b=[1,26],P=[1,27],E=[1,28],F=[1,29],D=[1,32],I=[1,33],w=[1,34],L=[1,39],N=[1,40],z=[1,42],R=[1,44],U=[1,62],C=[1,61],O=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Q=[1,65],W=[1,66],H=[1,67],M=[1,68],X=[1,69],B=[1,70],$=[1,71],Y=[1,72],j=[1,73],K=[1,74],G=[1,75],V=[1,76],Z=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,90],tt=[1,91],it=[1,92],et=[1,99],st=[1,93],at=[1,96],nt=[1,94],rt=[1,95],ht=[1,97],ot=[1,98],lt=[1,102],ct=[10,55,56,57],ut=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],dt={trace:o(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:o(function(t,i,e,s,a,n,r){var h=n.length-1;switch(a){case 23:case 68:this.$=n[h];break;case 24:case 69:this.$=n[h-1]+""+n[h];break;case 26:this.$=n[h-1]+n[h];break;case 27:this.$=[n[h].trim()];break;case 28:n[h-2].push(n[h].trim()),this.$=n[h-2];break;case 29:this.$=n[h-4],s.addClass(n[h-2],n[h]);break;case 37:this.$=[];break;case 42:this.$=n[h].trim(),s.setDiagramTitle(this.$);break;case 43:this.$=n[h].trim(),s.setAccTitle(this.$);break;case 44:case 45:this.$=n[h].trim(),s.setAccDescription(this.$);break;case 46:s.addSection(n[h].substr(8)),this.$=n[h].substr(8);break;case 47:s.addPoint(n[h-3],"",n[h-1],n[h],[]);break;case 48:s.addPoint(n[h-4],n[h-3],n[h-1],n[h],[]);break;case 49:s.addPoint(n[h-4],"",n[h-2],n[h-1],n[h]);break;case 50:s.addPoint(n[h-5],n[h-4],n[h-2],n[h-1],n[h]);break;case 51:s.setXAxisLeftText(n[h-2]),s.setXAxisRightText(n[h]);break;case 52:n[h-1].text+=" ⟶ ",s.setXAxisLeftText(n[h-1]);break;case 53:s.setXAxisLeftText(n[h]);break;case 54:s.setYAxisBottomText(n[h-2]),s.setYAxisTopText(n[h]);break;case 55:n[h-1].text+=" ⟶ ",s.setYAxisBottomText(n[h-1]);break;case 56:s.setYAxisBottomText(n[h]);break;case 57:s.setQuadrant1Text(n[h]);break;case 58:s.setQuadrant2Text(n[h]);break;case 59:s.setQuadrant3Text(n[h]);break;case 60:s.setQuadrant4Text(n[h]);break;case 64:case 66:this.$={text:n[h],type:"text"};break;case 65:this.$={text:n[h-1].text+""+n[h],type:n[h-1].type};break;case 67:this.$={text:n[h],type:"markdown"}}},"anonymous"),table:[{18:i,26:1,27:2,28:e,55:s,56:a,57:n},{1:[3]},{18:i,26:8,27:2,28:e,55:s,56:a,57:n},{18:i,26:9,27:2,28:e,55:s,56:a,57:n},t(r,[2,33],{29:10}),t(h,[2,61]),t(h,[2,62]),t(h,[2,63]),{1:[2,30]},{1:[2,31]},t(l,c,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:u,5:d,10:x,12:f,13:p,14:T,18:_,25:v,35:g,37:A,39:m,41:q,42:y,48:S,50:k,51:b,52:P,53:E,54:F,60:D,61:I,63:w,64:L,65:N,66:z,67:R}),t(r,[2,34]),{27:45,55:s,56:a,57:n},t(l,[2,37]),t(l,c,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:u,5:d,10:x,12:f,13:p,14:T,18:_,25:v,35:g,37:A,39:m,41:q,42:y,48:S,50:k,51:b,52:P,53:E,54:F,60:D,61:I,63:w,64:L,65:N,66:z,67:R}),t(l,[2,39]),t(l,[2,40]),t(l,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(l,[2,45]),t(l,[2,46]),{18:[1,50]},{4:u,5:d,10:x,12:f,13:p,14:T,43:51,58:31,60:D,61:I,63:w,64:L,65:N,66:z,67:R},{4:u,5:d,10:x,12:f,13:p,14:T,43:52,58:31,60:D,61:I,63:w,64:L,65:N,66:z,67:R},{4:u,5:d,10:x,12:f,13:p,14:T,43:53,58:31,60:D,61:I,63:w,64:L,65:N,66:z,67:R},{4:u,5:d,10:x,12:f,13:p,14:T,43:54,58:31,60:D,61:I,63:w,64:L,65:N,66:z,67:R},{4:u,5:d,10:x,12:f,13:p,14:T,43:55,58:31,60:D,61:I,63:w,64:L,65:N,66:z,67:R},{4:u,5:d,10:x,12:f,13:p,14:T,43:56,58:31,60:D,61:I,63:w,64:L,65:N,66:z,67:R},{4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,44:[1,57],47:[1,58],58:60,59:59,63:w,64:L,65:N,66:z,67:R},t(O,[2,64]),t(O,[2,66]),t(O,[2,67]),t(O,[2,70]),t(O,[2,71]),t(O,[2,72]),t(O,[2,73]),t(O,[2,74]),t(O,[2,75]),t(O,[2,76]),t(O,[2,77]),t(O,[2,78]),t(O,[2,79]),t(O,[2,80]),t(r,[2,35]),t(l,[2,38]),t(l,[2,42]),t(l,[2,43]),t(l,[2,44]),{3:64,4:Q,5:W,6:H,7:M,8:X,9:B,10:$,11:Y,12:j,13:K,14:G,15:V,21:63},t(l,[2,53],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,49:[1,77],63:w,64:L,65:N,66:z,67:R}),t(l,[2,56],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,49:[1,78],63:w,64:L,65:N,66:z,67:R}),t(l,[2,57],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,63:w,64:L,65:N,66:z,67:R}),t(l,[2,58],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,63:w,64:L,65:N,66:z,67:R}),t(l,[2,59],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,63:w,64:L,65:N,66:z,67:R}),t(l,[2,60],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,63:w,64:L,65:N,66:z,67:R}),{45:[1,79]},{44:[1,80]},t(O,[2,65]),t(O,[2,81]),t(O,[2,82]),t(O,[2,83]),{3:82,4:Q,5:W,6:H,7:M,8:X,9:B,10:$,11:Y,12:j,13:K,14:G,15:V,18:[1,81]},t(Z,[2,23]),t(Z,[2,1]),t(Z,[2,2]),t(Z,[2,3]),t(Z,[2,4]),t(Z,[2,5]),t(Z,[2,6]),t(Z,[2,7]),t(Z,[2,8]),t(Z,[2,9]),t(Z,[2,10]),t(Z,[2,11]),t(Z,[2,12]),t(l,[2,52],{58:31,43:83,4:u,5:d,10:x,12:f,13:p,14:T,60:D,61:I,63:w,64:L,65:N,66:z,67:R}),t(l,[2,55],{58:31,43:84,4:u,5:d,10:x,12:f,13:p,14:T,60:D,61:I,63:w,64:L,65:N,66:z,67:R}),{46:[1,85]},{45:[1,86]},{4:J,5:tt,6:it,8:et,11:st,13:at,16:89,17:nt,18:rt,19:ht,20:ot,22:88,23:87},t(Z,[2,24]),t(l,[2,51],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,63:w,64:L,65:N,66:z,67:R}),t(l,[2,54],{59:59,58:60,4:u,5:d,8:U,10:x,12:f,13:p,14:T,18:C,63:w,64:L,65:N,66:z,67:R}),t(l,[2,47],{22:88,16:89,23:100,4:J,5:tt,6:it,8:et,11:st,13:at,17:nt,18:rt,19:ht,20:ot}),{46:[1,101]},t(l,[2,29],{10:lt}),t(ct,[2,27],{16:103,4:J,5:tt,6:it,8:et,11:st,13:at,17:nt,18:rt,19:ht,20:ot}),t(ut,[2,25]),t(ut,[2,13]),t(ut,[2,14]),t(ut,[2,15]),t(ut,[2,16]),t(ut,[2,17]),t(ut,[2,18]),t(ut,[2,19]),t(ut,[2,20]),t(ut,[2,21]),t(ut,[2,22]),t(l,[2,49],{10:lt}),t(l,[2,48],{22:88,16:89,23:104,4:J,5:tt,6:it,8:et,11:st,13:at,17:nt,18:rt,19:ht,20:ot}),{4:J,5:tt,6:it,8:et,11:st,13:at,16:89,17:nt,18:rt,19:ht,20:ot,22:105},t(ut,[2,26]),t(l,[2,50],{10:lt}),t(ct,[2,28],{16:103,4:J,5:tt,6:it,8:et,11:st,13:at,17:nt,18:rt,19:ht,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(t,i){if(!i.recoverable){var e=new Error(t);throw e.hash=i,e}this.trace(t)},"parseError"),parse:o(function(t){var i=this,e=[0],s=[],a=[null],n=[],r=this.table,h="",l=0,c=0,u=n.slice.call(arguments,1),d=Object.create(this.lexer),x={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(x.yy[f]=this.yy[f]);d.setInput(t,x.yy),x.yy.lexer=d,x.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var p=d.yylloc;n.push(p);var T=d.options&&d.options.ranges;function _(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=i.symbols_[t]||t),t}"function"==typeof x.yy.parseError?this.parseError=x.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,o(function(t){e.length=e.length-2*t,a.length=a.length-t,n.length=n.length-t},"popStack"),o(_,"lex");for(var v,g,A,m,q,y,S,k,b={};;){if(g=e[e.length-1],this.defaultActions[g]?A=this.defaultActions[g]:(null==v&&(v=_()),A=r[g]&&r[g][v]),void 0===A||!A.length||!A[0]){var P="";for(q in k=[],r[g])this.terminals_[q]&&q>2&&k.push("'"+this.terminals_[q]+"'");P=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+k.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==v?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(P,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:p,expected:k})}if(A[0]instanceof Array&&A.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+v);switch(A[0]){case 1:e.push(v),a.push(d.yytext),n.push(d.yylloc),e.push(A[1]),v=null,c=d.yyleng,h=d.yytext,l=d.yylineno,p=d.yylloc;break;case 2:if(y=this.productions_[A[1]][1],b.$=a[a.length-y],b._$={first_line:n[n.length-(y||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(y||1)].first_column,last_column:n[n.length-1].last_column},T&&(b._$.range=[n[n.length-(y||1)].range[0],n[n.length-1].range[1]]),void 0!==(m=this.performAction.apply(b,[h,c,l,x.yy,A[1],a,n].concat(u))))return m;y&&(e=e.slice(0,-1*y*2),a=a.slice(0,-1*y),n=n.slice(0,-1*y)),e.push(this.productions_[A[1]][0]),a.push(b.$),n.push(b._$),S=r[e[e.length-2]][e[e.length-1]],e.push(S);break;case 3:return!0}}return!0},"parse")},xt=function(){return{EOF:1,parseError:o(function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},"parseError"),setInput:o(function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:o(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:o(function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var a=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:o(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:o(function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},"showPosition"),test_match:o(function(t,i){var e,s,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var n in a)this[n]=a[n];return!1}return!1},"test_match"),next:o(function(){if(this.done)return this.EOF;var t,i,e,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),n=0;n<a.length;n++)if((e=this._input.match(this.rules[a[n]]))&&(!i||e[0].length>i[0].length)){if(i=e,s=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(e,a[n])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,a[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:o(function(){var t=this.next();return t||this.lex()},"lex"),begin:o(function(t){this.conditionStack.push(t)},"begin"),popState:o(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:o(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:o(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:o(function(t){this.begin(t)},"pushState"),stateStackSize:o(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:o(function(t,i,e,s){switch(e){case 0:case 1:case 3:break;case 2:return 55;case 4:return this.begin("title"),35;case 5:return this.popState(),"title_value";case 6:return this.begin("acc_title"),37;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),39;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 23:case 25:case 31:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin("md_string");break;case 22:return"MD_STR";case 24:this.begin("string");break;case 26:return"STR";case 27:this.begin("class_name");break;case 28:return this.popState(),47;case 29:return this.begin("point_start"),44;case 30:return this.begin("point_x"),45;case 32:this.popState(),this.begin("point_y");break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 11;case 37:return 64;case 38:return 10;case 39:case 40:return 65;case 41:return 14;case 42:return 13;case 43:return 67;case 44:return 66;case 45:return 12;case 46:return 8;case 47:return 5;case 48:return 18;case 49:return 56;case 50:return 63;case 51:return 57}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}}}();function ft(){this.yy={}}return dt.lexer=xt,o(ft,"Parser"),ft.prototype=dt,dt.Parser=ft,new ft}();v.parser=v;var g=v,A=T(),m=(o(t=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){var t,i,e,s,a,n,r,h,o,l,c,u,d,x,p,T,_,v;return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:(null==(t=f.quadrantChart)?void 0:t.chartWidth)||500,chartWidth:(null==(i=f.quadrantChart)?void 0:i.chartHeight)||500,titlePadding:(null==(e=f.quadrantChart)?void 0:e.titlePadding)||10,titleFontSize:(null==(s=f.quadrantChart)?void 0:s.titleFontSize)||20,quadrantPadding:(null==(a=f.quadrantChart)?void 0:a.quadrantPadding)||5,xAxisLabelPadding:(null==(n=f.quadrantChart)?void 0:n.xAxisLabelPadding)||5,yAxisLabelPadding:(null==(r=f.quadrantChart)?void 0:r.yAxisLabelPadding)||5,xAxisLabelFontSize:(null==(h=f.quadrantChart)?void 0:h.xAxisLabelFontSize)||16,yAxisLabelFontSize:(null==(o=f.quadrantChart)?void 0:o.yAxisLabelFontSize)||16,quadrantLabelFontSize:(null==(l=f.quadrantChart)?void 0:l.quadrantLabelFontSize)||16,quadrantTextTopPadding:(null==(c=f.quadrantChart)?void 0:c.quadrantTextTopPadding)||5,pointTextPadding:(null==(u=f.quadrantChart)?void 0:u.pointTextPadding)||5,pointLabelFontSize:(null==(d=f.quadrantChart)?void 0:d.pointLabelFontSize)||12,pointRadius:(null==(x=f.quadrantChart)?void 0:x.pointRadius)||5,xAxisPosition:(null==(p=f.quadrantChart)?void 0:p.xAxisPosition)||"top",yAxisPosition:(null==(T=f.quadrantChart)?void 0:T.yAxisPosition)||"left",quadrantInternalBorderStrokeWidth:(null==(_=f.quadrantChart)?void 0:_.quadrantInternalBorderStrokeWidth)||1,quadrantExternalBorderStrokeWidth:(null==(v=f.quadrantChart)?void 0:v.quadrantExternalBorderStrokeWidth)||2}}getDefaultThemeConfig(){return{quadrant1Fill:A.quadrant1Fill,quadrant2Fill:A.quadrant2Fill,quadrant3Fill:A.quadrant3Fill,quadrant4Fill:A.quadrant4Fill,quadrant1TextFill:A.quadrant1TextFill,quadrant2TextFill:A.quadrant2TextFill,quadrant3TextFill:A.quadrant3TextFill,quadrant4TextFill:A.quadrant4TextFill,quadrantPointFill:A.quadrantPointFill,quadrantPointTextFill:A.quadrantPointTextFill,quadrantXAxisTextFill:A.quadrantXAxisTextFill,quadrantYAxisTextFill:A.quadrantYAxisTextFill,quadrantTitleFill:A.quadrantTitleFill,quadrantInternalBorderStrokeFill:A.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:A.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,c.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,i){this.classes.set(t,i)}setConfig(t){c.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){c.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,i,e,s){const a=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,n={top:"top"===t&&i?a:0,bottom:"bottom"===t&&i?a:0},r=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,h={left:"left"===this.config.yAxisPosition&&e?r:0,right:"right"===this.config.yAxisPosition&&e?r:0},o=this.config.titleFontSize+2*this.config.titlePadding,l={top:s?o:0},c=this.config.quadrantPadding+h.left,u=this.config.quadrantPadding+n.top+l.top,d=this.config.chartWidth-2*this.config.quadrantPadding-h.left-h.right,x=this.config.chartHeight-2*this.config.quadrantPadding-n.top-n.bottom-l.top;return{xAxisSpace:n,yAxisSpace:h,titleSpace:l,quadrantSpace:{quadrantLeft:c,quadrantTop:u,quadrantWidth:d,quadrantHalfWidth:d/2,quadrantHeight:x,quadrantHalfHeight:x/2}}}getAxisLabels(t,i,e,s){const{quadrantSpace:a,titleSpace:n}=s,{quadrantHalfHeight:r,quadrantHeight:h,quadrantLeft:o,quadrantHalfWidth:l,quadrantTop:c,quadrantWidth:u}=a,d=Boolean(this.data.xAxisRightText),x=Boolean(this.data.yAxisTopText),f=[];return this.data.xAxisLeftText&&i&&f.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:o+(d?l/2:0),y:"top"===t?this.config.xAxisLabelPadding+n.top:this.config.xAxisLabelPadding+c+h+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&i&&f.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:o+l+(d?l/2:0),y:"top"===t?this.config.xAxisLabelPadding+n.top:this.config.xAxisLabelPadding+c+h+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:d?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&e&&f.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+o+u+this.config.quadrantPadding,y:c+h-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&e&&f.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+o+u+this.config.quadrantPadding,y:c+r-(x?r/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:x?"center":"left",horizontalPos:"top",rotation:-90}),f}getQuadrants(t){const{quadrantSpace:i}=t,{quadrantHalfHeight:e,quadrantLeft:s,quadrantHalfWidth:a,quadrantTop:n}=i,r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:s+a,y:n,width:a,height:e,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:s,y:n,width:a,height:e,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:s,y:n+e,width:a,height:e,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:s+a,y:n+e,width:a,height:e,fill:this.themeConfig.quadrant4Fill}];for(const h of r)h.text.x=h.x+h.width/2,0===this.data.points.length?(h.text.y=h.y+h.height/2,h.text.horizontalPos="middle"):(h.text.y=h.y+this.config.quadrantTextTopPadding,h.text.horizontalPos="top");return r}getQuadrantPoints(t){const{quadrantSpace:i}=t,{quadrantHeight:e,quadrantLeft:s,quadrantTop:a,quadrantWidth:n}=i,r=_().domain([0,1]).range([s,n+s]),h=_().domain([0,1]).range([e+a,a]);return this.data.points.map(t=>{const i=this.classes.get(t.className);i&&(t={...i,...t});return{x:r(t.x),y:h(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:r(t.x),y:h(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){const i=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:e}=t,{quadrantHalfHeight:s,quadrantHeight:a,quadrantLeft:n,quadrantHalfWidth:r,quadrantTop:h,quadrantWidth:o}=e;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-i,y1:h,x2:n+o+i,y2:h},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n+o,y1:h+i,x2:n+o,y2:h+a-i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-i,y1:h+a,x2:n+o+i,y2:h+a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n,y1:h+i,x2:n,y2:h+a-i},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+r,y1:h+i,x2:n+r,y2:h+a-i},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+i,y1:h+s,x2:n+o-i,y2:h+s}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){const t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),i=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),e=this.config.showTitle&&!!this.data.titleText,s=this.data.points.length>0?"bottom":this.config.xAxisPosition,a=this.calculateSpace(s,t,i,e);return{points:this.getQuadrantPoints(a),quadrants:this.getQuadrants(a),axisLabels:this.getAxisLabels(s,t,i,a),borderLines:this.getBorders(a),title:this.getTitle(e)}}},"QuadrantBuilder"),t),q=(i=class extends Error{constructor(t,i,e){super(`value for ${t} ${i} is invalid, please use a valid ${e}`),this.name="InvalidStyleError"}},o(i,"InvalidStyleError"),i);function y(t){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(t)}function S(t){return!/^\d+$/.test(t)}function k(t){return!/^\d+px$/.test(t)}o(y,"validateHexCode"),o(S,"validateNumber"),o(k,"validateSizeInPixels");var b=l();function P(t){return p(t.trim(),b)}o(P,"textSanitizer");var E=new m;function F(t){E.setData({quadrant1Text:P(t.text)})}function D(t){E.setData({quadrant2Text:P(t.text)})}function I(t){E.setData({quadrant3Text:P(t.text)})}function w(t){E.setData({quadrant4Text:P(t.text)})}function L(t){E.setData({xAxisLeftText:P(t.text)})}function N(t){E.setData({xAxisRightText:P(t.text)})}function z(t){E.setData({yAxisTopText:P(t.text)})}function R(t){E.setData({yAxisBottomText:P(t.text)})}function U(t){const i={};for(const e of t){const[t,s]=e.trim().split(/\s*:\s*/);if("radius"===t){if(S(s))throw new q(t,s,"number");i.radius=parseInt(s)}else if("color"===t){if(y(s))throw new q(t,s,"hex code");i.color=s}else if("stroke-color"===t){if(y(s))throw new q(t,s,"hex code");i.strokeColor=s}else{if("stroke-width"!==t)throw new Error(`style named ${t} is not supported.`);if(k(s))throw new q(t,s,"number of pixels (eg. 10px)");i.strokeWidth=s}}return i}function C(t,i,e,s,a){const n=U(a);E.addPoints([{x:e,y:s,text:P(t.text),className:i,...n}])}function O(t,i){E.addClass(t,U(i))}function Q(t){E.setConfig({chartWidth:t})}function W(t){E.setConfig({chartHeight:t})}function H(){const t=l(),{themeVariables:i,quadrantChart:e}=t;return e&&E.setConfig(e),E.setThemeConfig({quadrant1Fill:i.quadrant1Fill,quadrant2Fill:i.quadrant2Fill,quadrant3Fill:i.quadrant3Fill,quadrant4Fill:i.quadrant4Fill,quadrant1TextFill:i.quadrant1TextFill,quadrant2TextFill:i.quadrant2TextFill,quadrant3TextFill:i.quadrant3TextFill,quadrant4TextFill:i.quadrant4TextFill,quadrantPointFill:i.quadrantPointFill,quadrantPointTextFill:i.quadrantPointTextFill,quadrantXAxisTextFill:i.quadrantXAxisTextFill,quadrantYAxisTextFill:i.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:i.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:i.quadrantInternalBorderStrokeFill,quadrantTitleFill:i.quadrantTitleFill}),E.setData({titleText:a()}),E.build()}o(F,"setQuadrant1Text"),o(D,"setQuadrant2Text"),o(I,"setQuadrant3Text"),o(w,"setQuadrant4Text"),o(L,"setXAxisLeftText"),o(N,"setXAxisRightText"),o(z,"setYAxisTopText"),o(R,"setYAxisBottomText"),o(U,"parseStyles"),o(C,"addPoint"),o(O,"addClass"),o(Q,"setWidth"),o(W,"setHeight"),o(H,"getQuadrantData");var M={parser:g,db:{setWidth:Q,setHeight:W,setQuadrant1Text:F,setQuadrant2Text:D,setQuadrant3Text:I,setQuadrant4Text:w,setXAxisLeftText:L,setXAxisRightText:N,setYAxisTopText:z,setYAxisBottomText:R,parseStyles:U,addPoint:C,addClass:O,getQuadrantData:H,clear:o(function(){E.clear(),x()},"clear"),setAccTitle:h,getAccTitle:r,setDiagramTitle:n,getDiagramTitle:a,getAccDescription:s,setAccDescription:e},renderer:{draw:o((t,i,e,s)=>{var a,n,r;function h(t){return"top"===t?"hanging":"middle"}function x(t){return"left"===t?"start":"middle"}function f(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}o(h,"getDominantBaseLine"),o(x,"getTextAnchor"),o(f,"getTransformation");const p=l();c.debug("Rendering quadrant chart\n"+t);const T=p.securityLevel;let _;"sandbox"===T&&(_=u("#i"+i));const v=u("sandbox"===T?_.nodes()[0].contentDocument.body:"body").select(`[id="${i}"]`),g=v.append("g").attr("class","main"),A=(null==(a=p.quadrantChart)?void 0:a.chartWidth)??500,m=(null==(n=p.quadrantChart)?void 0:n.chartHeight)??500;d(v,m,A,(null==(r=p.quadrantChart)?void 0:r.useMaxWidth)??!0),v.attr("viewBox","0 0 "+A+" "+m),s.db.setHeight(m),s.db.setWidth(A);const q=s.db.getQuadrantData(),y=g.append("g").attr("class","quadrants"),S=g.append("g").attr("class","border"),k=g.append("g").attr("class","data-points"),b=g.append("g").attr("class","labels"),P=g.append("g").attr("class","title");q.title&&P.append("text").attr("x",0).attr("y",0).attr("fill",q.title.fill).attr("font-size",q.title.fontSize).attr("dominant-baseline",h(q.title.horizontalPos)).attr("text-anchor",x(q.title.verticalPos)).attr("transform",f(q.title)).text(q.title.text),q.borderLines&&S.selectAll("line").data(q.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth);const E=y.selectAll("g.quadrant").data(q.quadrants).enter().append("g").attr("class","quadrant");E.append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),E.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>h(t.text.horizontalPos)).attr("text-anchor",t=>x(t.text.verticalPos)).attr("transform",t=>f(t.text)).text(t=>t.text.text);b.selectAll("g.label").data(q.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>h(t.horizontalPos)).attr("text-anchor",t=>x(t.verticalPos)).attr("transform",t=>f(t));const F=k.selectAll("g.data-point").data(q.points).enter().append("g").attr("class","data-point");F.append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),F.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>h(t.text.horizontalPos)).attr("text-anchor",t=>x(t.text.verticalPos)).attr("transform",t=>f(t.text))},"draw")},styles:o(()=>"","styles")};export{M as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var t;import{g as e}from"./chunk-55IACEB6-DR-uhhX0.js";import{s}from"./chunk-QN33PNHL-VCJVvyMp.js";import{_ as i,b as r,a as n,s as a,g as h,p as c,q as o,c as u,l,y as E,B as f,o as R,r as I,u as _}from"./index-B5OdXvjH.js";var S=function(){var t=i(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,3],s=[1,4],r=[1,5],n=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],h=[1,22],c=[2,7],o=[1,26],u=[1,27],l=[1,28],E=[1,29],f=[1,33],R=[1,34],I=[1,35],_=[1,36],S=[1,37],d=[1,38],b=[1,24],m=[1,31],T=[1,32],N=[1,30],k=[1,39],p=[1,40],v=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],y=[1,61],A=[89,90],L=[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],C=[27,29],O=[1,70],g=[1,71],M=[1,72],q=[1,73],w=[1,74],D=[1,75],F=[1,76],P=[1,83],x=[1,80],U=[1,84],Y=[1,85],$=[1,86],V=[1,87],B=[1,88],Q=[1,89],H=[1,90],K=[1,91],j=[1,92],W=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],G=[63,64],z=[1,101],X=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],J=[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],Z=[1,110],tt=[1,106],et=[1,107],st=[1,108],it=[1,109],rt=[1,111],nt=[1,116],at=[1,117],ht=[1,114],ct=[1,115],ot={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:i(function(t,e,s,i,r,n,a){var h=n.length-1;switch(r){case 4:this.$=n[h].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=n[h].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(n[h-3],n[h-4]);break;case 22:i.addRequirement(n[h-5],n[h-6]),i.setClass([n[h-5]],n[h-3]);break;case 23:i.setNewReqId(n[h-2]);break;case 24:i.setNewReqText(n[h-2]);break;case 25:i.setNewReqRisk(n[h-2]);break;case 26:i.setNewReqVerifyMethod(n[h-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(n[h-3]);break;case 43:i.addElement(n[h-5]),i.setClass([n[h-5]],n[h-3]);break;case 44:i.setNewElementType(n[h-2]);break;case 45:i.setNewElementDocRef(n[h-2]);break;case 48:i.addRelationship(n[h-2],n[h],n[h-4]);break;case 49:i.addRelationship(n[h-2],n[h-4],n[h]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=n[h-2],i.defineClass(n[h-1],n[h]);break;case 58:i.setClass(n[h-1],n[h]);break;case 59:i.setClass([n[h-2]],n[h]);break;case 60:case 62:case 65:this.$=[n[h]];break;case 61:case 63:this.$=n[h-2].concat([n[h]]);break;case 64:this.$=n[h-2],i.setCssStyle(n[h-1],n[h]);break;case 66:n[h-2].push(n[h]),this.$=n[h-2];break;case 68:this.$=n[h-1]+n[h]}},"anonymous"),table:[{3:1,4:2,6:e,9:s,11:r,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:s,11:r,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(a,[2,6]),{3:12,4:2,6:e,9:s,11:r,13:n},{1:[2,2]},{4:17,5:h,7:13,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},t(a,[2,4]),t(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:h,7:42,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:43,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:44,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:45,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:46,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:47,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:48,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:49,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:50,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{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]},t(v,[2,17]),t(v,[2,18]),t(v,[2,19]),t(v,[2,20]),{30:60,33:62,75:y,89:k,90:p},{30:63,33:62,75:y,89:k,90:p},{30:64,33:62,75:y,89:k,90:p},t(A,[2,29]),t(A,[2,30]),t(A,[2,31]),t(A,[2,32]),t(A,[2,33]),t(A,[2,34]),t(L,[2,81]),t(L,[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]},t(C,[2,79]),t(C,[2,80]),{27:[1,67],29:[1,68]},t(C,[2,85]),t(C,[2,86]),{62:69,65:O,66:g,67:M,68:q,69:w,70:D,71:F},{62:77,65:O,66:g,67:M,68:q,69:w,70:D,71:F},{30:78,33:62,75:y,89:k,90:p},{73:79,75:P,76:x,78:81,79:82,80:U,81:Y,82:$,83:V,84:B,85:Q,86:H,87:K,88:j},t(W,[2,60]),t(W,[2,62]),{73:93,75:P,76:x,78:81,79:82,80:U,81:Y,82:$,83:V,84:B,85:Q,86:H,87:K,88:j},{30:94,33:62,75:y,76:x,89:k,90:p},{5:[1,95]},{30:96,33:62,75:y,89:k,90:p},{5:[1,97]},{30:98,33:62,75:y,89:k,90:p},{63:[1,99]},t(G,[2,50]),t(G,[2,51]),t(G,[2,52]),t(G,[2,53]),t(G,[2,54]),t(G,[2,55]),t(G,[2,56]),{64:[1,100]},t(v,[2,59],{76:x}),t(v,[2,64],{76:z}),{33:103,75:[1,102],89:k,90:p},t(X,[2,65],{79:104,75:P,80:U,81:Y,82:$,83:V,84:B,85:Q,86:H,87:K,88:j}),t(J,[2,67]),t(J,[2,69]),t(J,[2,70]),t(J,[2,71]),t(J,[2,72]),t(J,[2,73]),t(J,[2,74]),t(J,[2,75]),t(J,[2,76]),t(J,[2,77]),t(J,[2,78]),t(v,[2,57],{76:z}),t(v,[2,58],{76:x}),{5:Z,28:105,31:tt,34:et,36:st,38:it,40:rt},{27:[1,112],76:x},{5:nt,40:at,56:113,57:ht,59:ct},{27:[1,118],76:x},{33:119,89:k,90:p},{33:120,89:k,90:p},{75:P,78:121,79:82,80:U,81:Y,82:$,83:V,84:B,85:Q,86:H,87:K,88:j},t(W,[2,61]),t(W,[2,63]),t(J,[2,68]),t(v,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Z,28:126,31:tt,34:et,36:st,38:it,40:rt},t(v,[2,28]),{5:[1,127]},t(v,[2,42]),{32:[1,128]},{32:[1,129]},{5:nt,40:at,56:130,57:ht,59:ct},t(v,[2,47]),{5:[1,131]},t(v,[2,48]),t(v,[2,49]),t(X,[2,66],{79:104,75:P,80:U,81:Y,82:$,83:V,84:B,85:Q,86:H,87:K,88:j}),{33:132,89:k,90:p},{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]},t(v,[2,27]),{5:Z,28:145,31:tt,34:et,36:st,38:it,40:rt},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(v,[2,46]),{5:nt,40:at,56:152,57:ht,59:ct},{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]},t(v,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(v,[2,43]),{5:Z,28:159,31:tt,34:et,36:st,38:it,40:rt},{5:Z,28:160,31:tt,34:et,36:st,38:it,40:rt},{5:Z,28:161,31:tt,34:et,36:st,38:it,40:rt},{5:Z,28:162,31:tt,34:et,36:st,38:it,40:rt},{5:nt,40:at,56:163,57:ht,59:ct},{5:nt,40:at,56:164,57:ht,59:ct},t(v,[2,23]),t(v,[2,24]),t(v,[2,25]),t(v,[2,26]),t(v,[2,44]),t(v,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:i(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:i(function(t){var e=this,s=[0],r=[],n=[null],a=[],h=this.table,c="",o=0,u=0,l=a.slice.call(arguments,1),E=Object.create(this.lexer),f={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(f.yy[R]=this.yy[R]);E.setInput(t,f.yy),f.yy.lexer=E,f.yy.parser=this,void 0===E.yylloc&&(E.yylloc={});var I=E.yylloc;a.push(I);var _=E.options&&E.options.ranges;function S(){var t;return"number"!=typeof(t=r.pop()||E.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i(function(t){s.length=s.length-2*t,n.length=n.length-t,a.length=a.length-t},"popStack"),i(S,"lex");for(var d,b,m,T,N,k,p,v,y={};;){if(b=s[s.length-1],this.defaultActions[b]?m=this.defaultActions[b]:(null==d&&(d=S()),m=h[b]&&h[b][d]),void 0===m||!m.length||!m[0]){var A="";for(N in v=[],h[b])this.terminals_[N]&&N>2&&v.push("'"+this.terminals_[N]+"'");A=E.showPosition?"Parse error on line "+(o+1)+":\n"+E.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[d]||d)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(A,{text:E.match,token:this.terminals_[d]||d,line:E.yylineno,loc:I,expected:v})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+d);switch(m[0]){case 1:s.push(d),n.push(E.yytext),a.push(E.yylloc),s.push(m[1]),d=null,u=E.yyleng,c=E.yytext,o=E.yylineno,I=E.yylloc;break;case 2:if(k=this.productions_[m[1]][1],y.$=n[n.length-k],y._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},_&&(y._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(y,[c,u,o,f.yy,m[1],n,a].concat(l))))return T;k&&(s=s.slice(0,-1*k*2),n=n.slice(0,-1*k),a=a.slice(0,-1*k)),s.push(this.productions_[m[1]][0]),n.push(y.$),a.push(y._$),p=h[s[s.length-2]][s[s.length-1]],s.push(p);break;case 3:return!0}}return!0},"parse")},ut=function(){return{EOF:1,parseError:i(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:i(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:i(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:i(function(t){this.unput(this.match.slice(t))},"less"),pastInput:i(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:i(function(t,e){var s,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var n in r)this[n]=r[n];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),n=0;n<r.length;n++)if((s=this._input.match(this.rules[r[n]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){var t=this.next();return t||this.lex()},"lex"),begin:i(function(t){this.conditionStack.push(t)},"begin"),popState:i(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:i(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:i(function(t){this.begin(t)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:i(function(t,e,s,i){switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 58:case 65:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:case 56:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:case 68:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 57:case 64:this.begin("string");break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 66:return"qString";case 67:return e.yytext=e.yytext.trim(),89;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}}();function lt(){this.yy={}}return ot.lexer=ut,i(lt,"Parser"),lt.prototype=ot,ot.Parser=lt,new lt}();S.parser=S;var d=S,b=(i(t=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=r,this.getAccTitle=n,this.setAccDescription=a,this.getAccDescription=h,this.setDiagramTitle=c,this.getDiagramTitle=o,this.getConfig=i(()=>u().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(t){this.direction=t}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(t,e){return this.requirements.has(t)||this.requirements.set(t,{name:t,type:e,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=t)}setNewReqText(t){void 0!==this.latestRequirement&&(this.latestRequirement.text=t)}setNewReqRisk(t){void 0!==this.latestRequirement&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=t)}addElement(t){return this.elements.has(t)||(this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),l.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){void 0!==this.latestElement&&(this.latestElement.type=t)}setNewElementDocRef(t){void 0!==this.latestElement&&(this.latestElement.docRef=t)}addRelationship(t,e,s){this.relations.push({type:t,src:e,dst:s})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,E()}setCssStyle(t,e){for(const s of t){const t=this.requirements.get(s)??this.elements.get(s);if(!e||!t)return;for(const s of e)s.includes(",")?t.cssStyles.push(...s.split(",")):t.cssStyles.push(s)}}setClass(t,e){var s;for(const i of t){const t=this.requirements.get(i)??this.elements.get(i);if(t)for(const i of e){t.classes.push(i);const e=null==(s=this.classes.get(i))?void 0:s.styles;e&&t.cssStyles.push(...e)}}}defineClass(t,e){for(const s of t){let t=this.classes.get(s);void 0===t&&(t={id:s,styles:[],textStyles:[]},this.classes.set(s,t)),e&&e.forEach(function(e){if(/color/.exec(e)){const s=e.replace("fill","bgFill");t.textStyles.push(s)}t.styles.push(e)}),this.requirements.forEach(t=>{t.classes.includes(s)&&t.cssStyles.push(...e.flatMap(t=>t.split(",")))}),this.elements.forEach(t=>{t.classes.includes(s)&&t.cssStyles.push(...e.flatMap(t=>t.split(",")))})}}getClasses(){return this.classes}getData(){var t,e,s,i;const r=u(),n=[],a=[];for(const h of this.requirements.values()){const t=h;t.id=h.name,t.cssStyles=h.cssStyles,t.cssClasses=h.classes.join(" "),t.shape="requirementBox",t.look=r.look,n.push(t)}for(const h of this.elements.values()){const t=h;t.shape="requirementBox",t.look=r.look,t.id=h.name,t.cssStyles=h.cssStyles,t.cssClasses=h.classes.join(" "),n.push(t)}for(const h of this.relations){let n=0;const c=h.type===this.Relationships.CONTAINS,o={id:`${h.src}-${h.dst}-${n}`,start:(null==(t=this.requirements.get(h.src))?void 0:t.name)??(null==(e=this.elements.get(h.src))?void 0:e.name),end:(null==(s=this.requirements.get(h.dst))?void 0:s.name)??(null==(i=this.elements.get(h.dst))?void 0:i.name),label:`<<${h.type}>>`,classes:"relationshipLine",style:["fill:none",c?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:c?"normal":"dashed",arrowTypeStart:c?"requirement_contains":"",arrowTypeEnd:c?"":"requirement_arrow",look:r.look};a.push(o),n++}return{nodes:n,edges:a,other:{},config:r,direction:this.getDirection()}}},"RequirementDB"),t),m=i(t=>`\n\n marker {\n fill: ${t.relationColor};\n stroke: ${t.relationColor};\n }\n\n marker.cross {\n stroke: ${t.lineColor};\n }\n\n svg {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n }\n\n .reqBox {\n fill: ${t.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${t.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${t.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${t.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${t.relationLabelColor};\n }\n .divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n }\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n .labelBkg {\n background-color: ${t.edgeLabelBackground};\n }\n\n`,"getStyles"),T={};f(T,{draw:()=>N});var N=i(async function(t,i,r,n){l.info("REF0:"),l.info("Drawing requirement diagram (unified)",i);const{securityLevel:a,state:h,layout:c}=u(),o=n.db.getData(),E=e(i,a);o.type=n.type,o.layoutAlgorithm=R(c),o.nodeSpacing=(null==h?void 0:h.nodeSpacing)??50,o.rankSpacing=(null==h?void 0:h.rankSpacing)??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=i,await I(o,E);_.insertTitle(E,"requirementDiagramTitleText",(null==h?void 0:h.titleTopMargin)??25,n.db.getDiagramTitle()),s(E,8,"requirementDiagram",(null==h?void 0:h.useMaxWidth)??!0)},"draw"),k={parser:d,get db(){return new b},renderer:T,styles:m};export{k as diagram};
|
|
1
|
+
var t;import{g as e}from"./chunk-55IACEB6-sCGtW4jw.js";import{s}from"./chunk-QN33PNHL-7lsjOUTT.js";import{_ as i,b as r,a as n,s as a,g as h,p as c,q as o,c as u,l,y as E,B as f,o as R,r as I,u as _}from"./index-30onxp6I.js";var S=function(){var t=i(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,3],s=[1,4],r=[1,5],n=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],h=[1,22],c=[2,7],o=[1,26],u=[1,27],l=[1,28],E=[1,29],f=[1,33],R=[1,34],I=[1,35],_=[1,36],S=[1,37],d=[1,38],b=[1,24],m=[1,31],T=[1,32],N=[1,30],k=[1,39],p=[1,40],v=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],y=[1,61],A=[89,90],L=[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],C=[27,29],O=[1,70],g=[1,71],M=[1,72],q=[1,73],w=[1,74],D=[1,75],F=[1,76],P=[1,83],x=[1,80],U=[1,84],Y=[1,85],$=[1,86],V=[1,87],B=[1,88],Q=[1,89],H=[1,90],K=[1,91],j=[1,92],W=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],G=[63,64],z=[1,101],X=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],J=[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],Z=[1,110],tt=[1,106],et=[1,107],st=[1,108],it=[1,109],rt=[1,111],nt=[1,116],at=[1,117],ht=[1,114],ct=[1,115],ot={trace:i(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:i(function(t,e,s,i,r,n,a){var h=n.length-1;switch(r){case 4:this.$=n[h].trim(),i.setAccTitle(this.$);break;case 5:case 6:this.$=n[h].trim(),i.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:i.setDirection("TB");break;case 18:i.setDirection("BT");break;case 19:i.setDirection("RL");break;case 20:i.setDirection("LR");break;case 21:i.addRequirement(n[h-3],n[h-4]);break;case 22:i.addRequirement(n[h-5],n[h-6]),i.setClass([n[h-5]],n[h-3]);break;case 23:i.setNewReqId(n[h-2]);break;case 24:i.setNewReqText(n[h-2]);break;case 25:i.setNewReqRisk(n[h-2]);break;case 26:i.setNewReqVerifyMethod(n[h-2]);break;case 29:this.$=i.RequirementType.REQUIREMENT;break;case 30:this.$=i.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=i.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=i.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=i.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=i.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=i.RiskLevel.LOW_RISK;break;case 36:this.$=i.RiskLevel.MED_RISK;break;case 37:this.$=i.RiskLevel.HIGH_RISK;break;case 38:this.$=i.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=i.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=i.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=i.VerifyType.VERIFY_TEST;break;case 42:i.addElement(n[h-3]);break;case 43:i.addElement(n[h-5]),i.setClass([n[h-5]],n[h-3]);break;case 44:i.setNewElementType(n[h-2]);break;case 45:i.setNewElementDocRef(n[h-2]);break;case 48:i.addRelationship(n[h-2],n[h],n[h-4]);break;case 49:i.addRelationship(n[h-2],n[h-4],n[h]);break;case 50:this.$=i.Relationships.CONTAINS;break;case 51:this.$=i.Relationships.COPIES;break;case 52:this.$=i.Relationships.DERIVES;break;case 53:this.$=i.Relationships.SATISFIES;break;case 54:this.$=i.Relationships.VERIFIES;break;case 55:this.$=i.Relationships.REFINES;break;case 56:this.$=i.Relationships.TRACES;break;case 57:this.$=n[h-2],i.defineClass(n[h-1],n[h]);break;case 58:i.setClass(n[h-1],n[h]);break;case 59:i.setClass([n[h-2]],n[h]);break;case 60:case 62:case 65:this.$=[n[h]];break;case 61:case 63:this.$=n[h-2].concat([n[h]]);break;case 64:this.$=n[h-2],i.setCssStyle(n[h-1],n[h]);break;case 66:n[h-2].push(n[h]),this.$=n[h-2];break;case 68:this.$=n[h-1]+n[h]}},"anonymous"),table:[{3:1,4:2,6:e,9:s,11:r,13:n},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:s,11:r,13:n},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(a,[2,6]),{3:12,4:2,6:e,9:s,11:r,13:n},{1:[2,2]},{4:17,5:h,7:13,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},t(a,[2,4]),t(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:h,7:42,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:43,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:44,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:45,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:46,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:47,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:48,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:49,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{4:17,5:h,7:50,8:c,9:s,11:r,13:n,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:o,22:u,23:l,24:E,25:23,33:25,41:f,42:R,43:I,44:_,45:S,46:d,54:b,72:m,74:T,77:N,89:k,90:p},{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]},t(v,[2,17]),t(v,[2,18]),t(v,[2,19]),t(v,[2,20]),{30:60,33:62,75:y,89:k,90:p},{30:63,33:62,75:y,89:k,90:p},{30:64,33:62,75:y,89:k,90:p},t(A,[2,29]),t(A,[2,30]),t(A,[2,31]),t(A,[2,32]),t(A,[2,33]),t(A,[2,34]),t(L,[2,81]),t(L,[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]},t(C,[2,79]),t(C,[2,80]),{27:[1,67],29:[1,68]},t(C,[2,85]),t(C,[2,86]),{62:69,65:O,66:g,67:M,68:q,69:w,70:D,71:F},{62:77,65:O,66:g,67:M,68:q,69:w,70:D,71:F},{30:78,33:62,75:y,89:k,90:p},{73:79,75:P,76:x,78:81,79:82,80:U,81:Y,82:$,83:V,84:B,85:Q,86:H,87:K,88:j},t(W,[2,60]),t(W,[2,62]),{73:93,75:P,76:x,78:81,79:82,80:U,81:Y,82:$,83:V,84:B,85:Q,86:H,87:K,88:j},{30:94,33:62,75:y,76:x,89:k,90:p},{5:[1,95]},{30:96,33:62,75:y,89:k,90:p},{5:[1,97]},{30:98,33:62,75:y,89:k,90:p},{63:[1,99]},t(G,[2,50]),t(G,[2,51]),t(G,[2,52]),t(G,[2,53]),t(G,[2,54]),t(G,[2,55]),t(G,[2,56]),{64:[1,100]},t(v,[2,59],{76:x}),t(v,[2,64],{76:z}),{33:103,75:[1,102],89:k,90:p},t(X,[2,65],{79:104,75:P,80:U,81:Y,82:$,83:V,84:B,85:Q,86:H,87:K,88:j}),t(J,[2,67]),t(J,[2,69]),t(J,[2,70]),t(J,[2,71]),t(J,[2,72]),t(J,[2,73]),t(J,[2,74]),t(J,[2,75]),t(J,[2,76]),t(J,[2,77]),t(J,[2,78]),t(v,[2,57],{76:z}),t(v,[2,58],{76:x}),{5:Z,28:105,31:tt,34:et,36:st,38:it,40:rt},{27:[1,112],76:x},{5:nt,40:at,56:113,57:ht,59:ct},{27:[1,118],76:x},{33:119,89:k,90:p},{33:120,89:k,90:p},{75:P,78:121,79:82,80:U,81:Y,82:$,83:V,84:B,85:Q,86:H,87:K,88:j},t(W,[2,61]),t(W,[2,63]),t(J,[2,68]),t(v,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:Z,28:126,31:tt,34:et,36:st,38:it,40:rt},t(v,[2,28]),{5:[1,127]},t(v,[2,42]),{32:[1,128]},{32:[1,129]},{5:nt,40:at,56:130,57:ht,59:ct},t(v,[2,47]),{5:[1,131]},t(v,[2,48]),t(v,[2,49]),t(X,[2,66],{79:104,75:P,80:U,81:Y,82:$,83:V,84:B,85:Q,86:H,87:K,88:j}),{33:132,89:k,90:p},{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]},t(v,[2,27]),{5:Z,28:145,31:tt,34:et,36:st,38:it,40:rt},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(v,[2,46]),{5:nt,40:at,56:152,57:ht,59:ct},{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]},t(v,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(v,[2,43]),{5:Z,28:159,31:tt,34:et,36:st,38:it,40:rt},{5:Z,28:160,31:tt,34:et,36:st,38:it,40:rt},{5:Z,28:161,31:tt,34:et,36:st,38:it,40:rt},{5:Z,28:162,31:tt,34:et,36:st,38:it,40:rt},{5:nt,40:at,56:163,57:ht,59:ct},{5:nt,40:at,56:164,57:ht,59:ct},t(v,[2,23]),t(v,[2,24]),t(v,[2,25]),t(v,[2,26]),t(v,[2,44]),t(v,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:i(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:i(function(t){var e=this,s=[0],r=[],n=[null],a=[],h=this.table,c="",o=0,u=0,l=a.slice.call(arguments,1),E=Object.create(this.lexer),f={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(f.yy[R]=this.yy[R]);E.setInput(t,f.yy),f.yy.lexer=E,f.yy.parser=this,void 0===E.yylloc&&(E.yylloc={});var I=E.yylloc;a.push(I);var _=E.options&&E.options.ranges;function S(){var t;return"number"!=typeof(t=r.pop()||E.lex()||1)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,i(function(t){s.length=s.length-2*t,n.length=n.length-t,a.length=a.length-t},"popStack"),i(S,"lex");for(var d,b,m,T,N,k,p,v,y={};;){if(b=s[s.length-1],this.defaultActions[b]?m=this.defaultActions[b]:(null==d&&(d=S()),m=h[b]&&h[b][d]),void 0===m||!m.length||!m[0]){var A="";for(N in v=[],h[b])this.terminals_[N]&&N>2&&v.push("'"+this.terminals_[N]+"'");A=E.showPosition?"Parse error on line "+(o+1)+":\n"+E.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[d]||d)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(A,{text:E.match,token:this.terminals_[d]||d,line:E.yylineno,loc:I,expected:v})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+d);switch(m[0]){case 1:s.push(d),n.push(E.yytext),a.push(E.yylloc),s.push(m[1]),d=null,u=E.yyleng,c=E.yytext,o=E.yylineno,I=E.yylloc;break;case 2:if(k=this.productions_[m[1]][1],y.$=n[n.length-k],y._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},_&&(y._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(y,[c,u,o,f.yy,m[1],n,a].concat(l))))return T;k&&(s=s.slice(0,-1*k*2),n=n.slice(0,-1*k),a=a.slice(0,-1*k)),s.push(this.productions_[m[1]][0]),n.push(y.$),a.push(y._$),p=h[s[s.length-2]][s[s.length-1]],s.push(p);break;case 3:return!0}}return!0},"parse")},ut=function(){return{EOF:1,parseError:i(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:i(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:i(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:i(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:i(function(){return this._more=!0,this},"more"),reject:i(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:i(function(t){this.unput(this.match.slice(t))},"less"),pastInput:i(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:i(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:i(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:i(function(t,e){var s,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var n in r)this[n]=r[n];return!1}return!1},"test_match"),next:i(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),n=0;n<r.length;n++)if((s=this._input.match(this.rules[r[n]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=n,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[n])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:i(function(){var t=this.next();return t||this.lex()},"lex"),begin:i(function(t){this.conditionStack.push(t)},"begin"),popState:i(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:i(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:i(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:i(function(t){this.begin(t)},"pushState"),stateStackSize:i(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:i(function(t,e,s,i){switch(s){case 0:return"title";case 1:return this.begin("acc_title"),9;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),11;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 58:case 65:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:case 14:case 15:case 56:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:case 68:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 57:case 64:this.begin("string");break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 66:return"qString";case 67:return e.yytext=e.yytext.trim(),89;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}}();function lt(){this.yy={}}return ot.lexer=ut,i(lt,"Parser"),lt.prototype=ot,ot.Parser=lt,new lt}();S.parser=S;var d=S,b=(i(t=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=r,this.getAccTitle=n,this.setAccDescription=a,this.getAccDescription=h,this.setDiagramTitle=c,this.getDiagramTitle=o,this.getConfig=i(()=>u().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(t){this.direction=t}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(t,e){return this.requirements.has(t)||this.requirements.set(t,{name:t,type:e,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=t)}setNewReqText(t){void 0!==this.latestRequirement&&(this.latestRequirement.text=t)}setNewReqRisk(t){void 0!==this.latestRequirement&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=t)}addElement(t){return this.elements.has(t)||(this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),l.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){void 0!==this.latestElement&&(this.latestElement.type=t)}setNewElementDocRef(t){void 0!==this.latestElement&&(this.latestElement.docRef=t)}addRelationship(t,e,s){this.relations.push({type:t,src:e,dst:s})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,E()}setCssStyle(t,e){for(const s of t){const t=this.requirements.get(s)??this.elements.get(s);if(!e||!t)return;for(const s of e)s.includes(",")?t.cssStyles.push(...s.split(",")):t.cssStyles.push(s)}}setClass(t,e){var s;for(const i of t){const t=this.requirements.get(i)??this.elements.get(i);if(t)for(const i of e){t.classes.push(i);const e=null==(s=this.classes.get(i))?void 0:s.styles;e&&t.cssStyles.push(...e)}}}defineClass(t,e){for(const s of t){let t=this.classes.get(s);void 0===t&&(t={id:s,styles:[],textStyles:[]},this.classes.set(s,t)),e&&e.forEach(function(e){if(/color/.exec(e)){const s=e.replace("fill","bgFill");t.textStyles.push(s)}t.styles.push(e)}),this.requirements.forEach(t=>{t.classes.includes(s)&&t.cssStyles.push(...e.flatMap(t=>t.split(",")))}),this.elements.forEach(t=>{t.classes.includes(s)&&t.cssStyles.push(...e.flatMap(t=>t.split(",")))})}}getClasses(){return this.classes}getData(){var t,e,s,i;const r=u(),n=[],a=[];for(const h of this.requirements.values()){const t=h;t.id=h.name,t.cssStyles=h.cssStyles,t.cssClasses=h.classes.join(" "),t.shape="requirementBox",t.look=r.look,n.push(t)}for(const h of this.elements.values()){const t=h;t.shape="requirementBox",t.look=r.look,t.id=h.name,t.cssStyles=h.cssStyles,t.cssClasses=h.classes.join(" "),n.push(t)}for(const h of this.relations){let n=0;const c=h.type===this.Relationships.CONTAINS,o={id:`${h.src}-${h.dst}-${n}`,start:(null==(t=this.requirements.get(h.src))?void 0:t.name)??(null==(e=this.elements.get(h.src))?void 0:e.name),end:(null==(s=this.requirements.get(h.dst))?void 0:s.name)??(null==(i=this.elements.get(h.dst))?void 0:i.name),label:`<<${h.type}>>`,classes:"relationshipLine",style:["fill:none",c?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:c?"normal":"dashed",arrowTypeStart:c?"requirement_contains":"",arrowTypeEnd:c?"":"requirement_arrow",look:r.look};a.push(o),n++}return{nodes:n,edges:a,other:{},config:r,direction:this.getDirection()}}},"RequirementDB"),t),m=i(t=>`\n\n marker {\n fill: ${t.relationColor};\n stroke: ${t.relationColor};\n }\n\n marker.cross {\n stroke: ${t.lineColor};\n }\n\n svg {\n font-family: ${t.fontFamily};\n font-size: ${t.fontSize};\n }\n\n .reqBox {\n fill: ${t.requirementBackground};\n fill-opacity: 1.0;\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n \n .reqTitle, .reqLabel{\n fill: ${t.requirementTextColor};\n }\n .reqLabelBox {\n fill: ${t.relationLabelBackground};\n fill-opacity: 1.0;\n }\n\n .req-title-line {\n stroke: ${t.requirementBorderColor};\n stroke-width: ${t.requirementBorderSize};\n }\n .relationshipLine {\n stroke: ${t.relationColor};\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ${t.relationLabelColor};\n }\n .divider {\n stroke: ${t.nodeBorder};\n stroke-width: 1;\n }\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .label text,span {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n .labelBkg {\n background-color: ${t.edgeLabelBackground};\n }\n\n`,"getStyles"),T={};f(T,{draw:()=>N});var N=i(async function(t,i,r,n){l.info("REF0:"),l.info("Drawing requirement diagram (unified)",i);const{securityLevel:a,state:h,layout:c}=u(),o=n.db.getData(),E=e(i,a);o.type=n.type,o.layoutAlgorithm=R(c),o.nodeSpacing=(null==h?void 0:h.nodeSpacing)??50,o.rankSpacing=(null==h?void 0:h.rankSpacing)??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=i,await I(o,E);_.insertTitle(E,"requirementDiagramTitleText",(null==h?void 0:h.titleTopMargin)??25,n.db.getDiagramTitle()),s(E,8,"requirementDiagram",(null==h?void 0:h.useMaxWidth)??!0)},"draw"),k={parser:d,get db(){return new b},renderer:T,styles:m};export{k as diagram};
|