@wandox/sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/README.md +59 -0
  2. package/dist/arc-BJMRTG9S.cjs +1 -0
  3. package/dist/arc-Vdco0qfw.js +83 -0
  4. package/dist/architectureDiagram-3BPJPVTR-BjEqcvey.js +4695 -0
  5. package/dist/architectureDiagram-3BPJPVTR-BvjJfAkh.cjs +36 -0
  6. package/dist/blockDiagram-GPEHLZMM-B1xf7RE9.js +2427 -0
  7. package/dist/blockDiagram-GPEHLZMM-B5VqovGY.cjs +132 -0
  8. package/dist/c4Diagram-AAUBKEIU-C4kjMRea.js +1578 -0
  9. package/dist/c4Diagram-AAUBKEIU-Ck5uEnJI.cjs +10 -0
  10. package/dist/channel-DlRtLuYv.js +5 -0
  11. package/dist/channel-Dm_yrRYJ.cjs +1 -0
  12. package/dist/chunk-2J33WTMH-CG2n_n4y.cjs +1 -0
  13. package/dist/chunk-2J33WTMH-CWvmGb4H.js +20 -0
  14. package/dist/chunk-4BX2VUAB-Bq3GzsD8.js +9 -0
  15. package/dist/chunk-4BX2VUAB-CdMctZeT.cjs +1 -0
  16. package/dist/chunk-55IACEB6-BdJhzL0d.js +8 -0
  17. package/dist/chunk-55IACEB6-sHyHtvg8.cjs +1 -0
  18. package/dist/chunk-727SXJPM-D-Vmam30.cjs +206 -0
  19. package/dist/chunk-727SXJPM-DmruCqjM.js +1529 -0
  20. package/dist/chunk-AQP2D5EJ-CWhKjcV3.cjs +231 -0
  21. package/dist/chunk-AQP2D5EJ-Ca0ak6w7.js +1399 -0
  22. package/dist/chunk-FMBD7UC4-CqV0NWQQ.js +19 -0
  23. package/dist/chunk-FMBD7UC4-DOxtd0OO.cjs +15 -0
  24. package/dist/chunk-ND2GUHAM-6EMX5Mu8.js +68 -0
  25. package/dist/chunk-ND2GUHAM-BXeDBtSC.cjs +1 -0
  26. package/dist/chunk-QZHKN3VN-B7FSI55w.js +15 -0
  27. package/dist/chunk-QZHKN3VN-CbbdNKnD.cjs +1 -0
  28. package/dist/classDiagram-4FO5ZUOK-0Kaf7WfA.js +16 -0
  29. package/dist/classDiagram-4FO5ZUOK-C4it2xBI.cjs +1 -0
  30. package/dist/classDiagram-v2-Q7XG4LA2-Byom5adL.js +16 -0
  31. package/dist/classDiagram-v2-Q7XG4LA2-C4it2xBI.cjs +1 -0
  32. package/dist/cose-bilkent-S5V4N54A-CuUv9oIm.js +2606 -0
  33. package/dist/cose-bilkent-S5V4N54A-Dh6nTopA.cjs +1 -0
  34. package/dist/cytoscape.esm-Cp8cXbK2.js +18729 -0
  35. package/dist/cytoscape.esm-fcqEUasK.cjs +331 -0
  36. package/dist/dagre-BM42HDAG-CwxJjZ2n.cjs +4 -0
  37. package/dist/dagre-BM42HDAG-DMBidMxP.js +448 -0
  38. package/dist/defaultLocale-BDVPUiG2.js +171 -0
  39. package/dist/defaultLocale-k2G_58r6.cjs +1 -0
  40. package/dist/diagram-2AECGRRQ-B2a4nXgJ.js +221 -0
  41. package/dist/diagram-2AECGRRQ-r7De7taS.cjs +43 -0
  42. package/dist/diagram-5GNKFQAL-CDiO79WC.cjs +10 -0
  43. package/dist/diagram-5GNKFQAL-DrHBNZzF.js +123 -0
  44. package/dist/diagram-KO2AKTUF-BcjWCXZr.js +466 -0
  45. package/dist/diagram-KO2AKTUF-CDlJCxVO.cjs +3 -0
  46. package/dist/diagram-LMA3HP47-BXFSAyNV.cjs +24 -0
  47. package/dist/diagram-LMA3HP47-DJxmyqn0.js +143 -0
  48. package/dist/diagram-OG6HWLK6-ATK__ca8.js +531 -0
  49. package/dist/diagram-OG6HWLK6-CgIyEO8_.cjs +24 -0
  50. package/dist/erDiagram-TEJ5UH35-D4baWNzQ.js +900 -0
  51. package/dist/erDiagram-TEJ5UH35-Dyuc5EB6.cjs +85 -0
  52. package/dist/flowDiagram-I6XJVG4X-BMZOncyU.js +1635 -0
  53. package/dist/flowDiagram-I6XJVG4X-C45fICr4.cjs +162 -0
  54. package/dist/ganttDiagram-6RSMTGT7-CiYZmmke.js +2526 -0
  55. package/dist/ganttDiagram-6RSMTGT7-Cxoj6IK8.cjs +292 -0
  56. package/dist/gitGraphDiagram-PVQCEYII-CQ9bNuwN.js +828 -0
  57. package/dist/gitGraphDiagram-PVQCEYII-rlaY9dfj.cjs +106 -0
  58. package/dist/graph-CBizzZ7K.js +1545 -0
  59. package/dist/graph-V5BNIbHU.cjs +1 -0
  60. package/dist/index-jBRold1l.js +173159 -0
  61. package/dist/index-sFrjovbM.cjs +804 -0
  62. package/dist/index.d.ts +54 -0
  63. package/dist/infoDiagram-5YYISTIA-CAzYIvUX.js +24 -0
  64. package/dist/infoDiagram-5YYISTIA-zX5rQglQ.cjs +2 -0
  65. package/dist/init-CHZsXQcr.cjs +1 -0
  66. package/dist/init-DjUOC4st.js +16 -0
  67. package/dist/ishikawaDiagram-YF4QCWOH-09prKBsn.cjs +70 -0
  68. package/dist/ishikawaDiagram-YF4QCWOH-Co8BnN24.js +622 -0
  69. package/dist/journeyDiagram-JHISSGLW-DkdWRF_-.cjs +139 -0
  70. package/dist/journeyDiagram-JHISSGLW-riCLiMCC.js +836 -0
  71. package/dist/kanban-definition-UN3LZRKU-DWipOCsx.cjs +89 -0
  72. package/dist/kanban-definition-UN3LZRKU-SRyCSn2H.js +725 -0
  73. package/dist/katex-Cf_UVKIT.cjs +257 -0
  74. package/dist/katex-RNjvZ8pg.js +11681 -0
  75. package/dist/layout-CbksXFOD.js +1728 -0
  76. package/dist/layout-Dh52gsIJ.cjs +1 -0
  77. package/dist/linear-C3xSMJV8.cjs +1 -0
  78. package/dist/linear-CmUCzX9U.js +259 -0
  79. package/dist/mermaid.core-BzNKr-OJ.cjs +308 -0
  80. package/dist/mermaid.core-CdBIz6FY.js +15475 -0
  81. package/dist/mindmap-definition-RKZ34NQL-Cs63oyIX.cjs +96 -0
  82. package/dist/mindmap-definition-RKZ34NQL-Gcma5iTd.js +830 -0
  83. package/dist/ordinal-CagbB1m8.cjs +1 -0
  84. package/dist/ordinal-DfAQgscy.js +61 -0
  85. package/dist/pieDiagram-4H26LBE5-CBGkD8dp.cjs +30 -0
  86. package/dist/pieDiagram-4H26LBE5-DSL8cVK1.js +164 -0
  87. package/dist/quadrantDiagram-W4KKPZXB-D3nCWRjF.cjs +7 -0
  88. package/dist/quadrantDiagram-W4KKPZXB-uod6bhUy.js +1026 -0
  89. package/dist/requirementDiagram-4Y6WPE33-Bc_6y7SM.js +884 -0
  90. package/dist/requirementDiagram-4Y6WPE33-D2mHlh5i.cjs +84 -0
  91. package/dist/sankeyDiagram-5OEKKPKP-DL_kXejW.cjs +40 -0
  92. package/dist/sankeyDiagram-5OEKKPKP-DMsjY4G4.js +847 -0
  93. package/dist/sequenceDiagram-3UESZ5HK-CBGalGOV.cjs +162 -0
  94. package/dist/sequenceDiagram-3UESZ5HK-CH2Z-Pis.js +2901 -0
  95. package/dist/stateDiagram-AJRCARHV-gEqlAI6t.js +263 -0
  96. package/dist/stateDiagram-AJRCARHV-rNMrAI-A.cjs +1 -0
  97. package/dist/stateDiagram-v2-BHNVJYJU-CDj7L1wi.js +16 -0
  98. package/dist/stateDiagram-v2-BHNVJYJU-LLlFJ1GM.cjs +1 -0
  99. package/dist/timeline-definition-PNZ67QCA-Bbuv3uu-.cjs +120 -0
  100. package/dist/timeline-definition-PNZ67QCA-DrGFbQdC.js +1068 -0
  101. package/dist/types.d.ts +295 -0
  102. package/dist/vennDiagram-CIIHVFJN-CGcAwVxU.js +1564 -0
  103. package/dist/vennDiagram-CIIHVFJN-DsSjXluJ.cjs +34 -0
  104. package/dist/wandox.cjs +1 -0
  105. package/dist/wandox.css +1 -0
  106. package/dist/wandox.js +6 -0
  107. package/dist/wandox.umd.js +4172 -0
  108. package/dist/wardley-L42UT6IY-DUnkyH_z.js +22539 -0
  109. package/dist/wardley-L42UT6IY-tDp0NbFW.cjs +165 -0
  110. package/dist/wardleyDiagram-YWT4CUSO-CB_Qa4lR.js +684 -0
  111. package/dist/wardleyDiagram-YWT4CUSO-D0BUmvVW.cjs +78 -0
  112. package/dist/xychartDiagram-2RQKCTM6-Bcq-ACuw.js +1342 -0
  113. package/dist/xychartDiagram-2RQKCTM6-BjeAPKLo.cjs +7 -0
  114. package/package.json +42 -0
@@ -0,0 +1,84 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const We=require("./chunk-55IACEB6-sHyHtvg8.cjs"),je=require("./chunk-2J33WTMH-CG2n_n4y.cjs"),r=require("./mermaid.core-BzNKr-OJ.cjs");var Ne=function(){var e=r.__name(function($,i,a,c){for(a=a||{},c=$.length;c--;a[$[c]]=i);return a},"o"),n=[1,3],m=[1,4],u=[1,5],h=[1,6],o=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],d=[1,22],E=[2,7],f=[1,26],_=[1,27],b=[1,28],k=[1,29],C=[1,33],V=[1,34],A=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],g=[1,39],y=[1,40],p=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],qe=[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],de=[27,29],Ce=[1,70],Ve=[1,71],Ae=[1,72],ve=[1,73],Le=[1,74],xe=[1,75],Oe=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],Ee=[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],Y=[63,64],we=[1,101],De=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],N=[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],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],me=[1,114],fe=[1,115],Se={trace:r.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",21:"direction_tb",22:"direction_bt",23:"direction_rl",24:"direction_lr",27:"STRUCT_START",29:"STYLE_SEPARATOR",31:"ID",32:"COLONSEP",34:"TEXT",36:"RISK",38:"VERIFYMTHD",40:"STRUCT_STOP",41:"REQUIREMENT",42:"FUNCTIONAL_REQUIREMENT",43:"INTERFACE_REQUIREMENT",44:"PERFORMANCE_REQUIREMENT",45:"PHYSICAL_REQUIREMENT",46:"DESIGN_CONSTRAINT",47:"LOW_RISK",48:"MED_RISK",49:"HIGH_RISK",50:"VERIFY_ANALYSIS",51:"VERIFY_DEMONSTRATION",52:"VERIFY_INSPECTION",53:"VERIFY_TEST",54:"ELEMENT",57:"TYPE",59:"DOCREF",61:"END_ARROW_L",63:"LINE",64:"END_ARROW_R",65:"CONTAINS",66:"COPIES",67:"DERIVES",68:"SATISFIES",69:"VERIFIES",70:"REFINES",71:"TRACES",72:"CLASSDEF",74:"CLASS",75:"ALPHA",76:"COMMA",77:"STYLE",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",86:"MINUS",87:"LABEL",88:"SEMICOLON",89:"unqString",90:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:r.__name(function(i,a,c,s,R,t,_e){var l=t.length-1;switch(R){case 4:this.$=t[l].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[l].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[l-3],t[l-4]);break;case 22:s.addRequirement(t[l-5],t[l-6]),s.setClass([t[l-5]],t[l-3]);break;case 23:s.setNewReqId(t[l-2]);break;case 24:s.setNewReqText(t[l-2]);break;case 25:s.setNewReqRisk(t[l-2]);break;case 26:s.setNewReqVerifyMethod(t[l-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[l-3]);break;case 43:s.addElement(t[l-5]),s.setClass([t[l-5]],t[l-3]);break;case 44:s.setNewElementType(t[l-2]);break;case 45:s.setNewElementDocRef(t[l-2]);break;case 48:s.addRelationship(t[l-2],t[l],t[l-4]);break;case 49:s.addRelationship(t[l-2],t[l-4],t[l]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[l-2],s.defineClass(t[l-1],t[l]);break;case 58:s.setClass(t[l-1],t[l]);break;case 59:s.setClass([t[l-2]],t[l]);break;case 60:case 62:this.$=[t[l]];break;case 61:case 63:this.$=t[l-2].concat([t[l]]);break;case 64:this.$=t[l-2],s.setCssStyle(t[l-1],t[l]);break;case 65:this.$=[t[l]];break;case 66:t[l-2].push(t[l]),this.$=t[l-2];break;case 68:this.$=t[l-1]+t[l];break}},"anonymous"),table:[{3:1,4:2,6:n,9:m,11:u,13:h},{1:[3]},{3:8,4:2,5:[1,7],6:n,9:m,11:u,13:h},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(o,[2,6]),{3:12,4:2,6:n,9:m,11:u,13:h},{1:[2,2]},{4:17,5:d,7:13,8:E,9:m,11:u,13:h,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:_,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:g,90:y},e(o,[2,4]),e(o,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:d,7:42,8:E,9:m,11:u,13:h,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:_,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:g,90:y},{4:17,5:d,7:43,8:E,9:m,11:u,13:h,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:_,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:g,90:y},{4:17,5:d,7:44,8:E,9:m,11:u,13:h,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:_,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:g,90:y},{4:17,5:d,7:45,8:E,9:m,11:u,13:h,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:_,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:g,90:y},{4:17,5:d,7:46,8:E,9:m,11:u,13:h,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:_,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:g,90:y},{4:17,5:d,7:47,8:E,9:m,11:u,13:h,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:_,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:g,90:y},{4:17,5:d,7:48,8:E,9:m,11:u,13:h,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:_,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:g,90:y},{4:17,5:d,7:49,8:E,9:m,11:u,13:h,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:_,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:g,90:y},{4:17,5:d,7:50,8:E,9:m,11:u,13:h,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:_,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:g,90:y},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(p,[2,17]),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),{30:60,33:62,75:P,89:g,90:y},{30:63,33:62,75:P,89:g,90:y},{30:64,33:62,75:P,89:g,90:y},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(qe,[2,81]),e(qe,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(de,[2,79]),e(de,[2,80]),{27:[1,67],29:[1,68]},e(de,[2,85]),e(de,[2,86]),{62:69,65:Ce,66:Ve,67:Ae,68:ve,69:Le,70:xe,71:Oe},{62:77,65:Ce,66:Ve,67:Ae,68:ve,69:Le,70:xe,71:Oe},{30:78,33:62,75:P,89:g,90:y},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(Ee,[2,60]),e(Ee,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:g,90:y},{5:[1,95]},{30:96,33:62,75:P,89:g,90:y},{5:[1,97]},{30:98,33:62,75:P,89:g,90:y},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(p,[2,59],{76:U}),e(p,[2,64],{76:we}),{33:103,75:[1,102],89:g,90:y},e(De,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(N,[2,67]),e(N,[2,69]),e(N,[2,70]),e(N,[2,71]),e(N,[2,72]),e(N,[2,73]),e(N,[2,74]),e(N,[2,75]),e(N,[2,76]),e(N,[2,77]),e(N,[2,78]),e(p,[2,57],{76:we}),e(p,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:me,59:fe},{27:[1,118],76:U},{33:119,89:g,90:y},{33:120,89:g,90:y},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(Ee,[2,61]),e(Ee,[2,63]),e(N,[2,68]),e(p,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(p,[2,28]),{5:[1,127]},e(p,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:me,59:fe},e(p,[2,47]),{5:[1,131]},e(p,[2,48]),e(p,[2,49]),e(De,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:g,90:y},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(p,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(p,[2,46]),{5:he,40:ue,56:152,57:me,59:fe},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(p,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(p,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:me,59:fe},{5:he,40:ue,56:164,57:me,59:fe},e(p,[2,23]),e(p,[2,24]),e(p,[2,25]),e(p,[2,26]),e(p,[2,44]),e(p,[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:r.__name(function(i,a){if(a.recoverable)this.trace(i);else{var c=new Error(i);throw c.hash=a,c}},"parseError"),parse:r.__name(function(i){var a=this,c=[0],s=[],R=[null],t=[],_e=this.table,l="",pe=0,Me=0,Be=2,Fe=1,Qe=t.slice.call(arguments,1),S=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);S.setInput(i,G.yy),G.yy.lexer=S,G.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var Ie=S.yylloc;t.push(Ie);var He=S.options&&S.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ke(T){c.length=c.length-2*T,R.length=R.length-T,t.length=t.length-T}r.__name(Ke,"popStack");function $e(){var T;return T=s.pop()||S.lex()||Fe,typeof T!="number"&&(T instanceof Array&&(s=T,T=s.pop()),T=a.symbols_[T]||T),T}r.__name($e,"lex");for(var I,z,q,Te,J={},ge,F,Pe,ye;;){if(z=c[c.length-1],this.defaultActions[z]?q=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=$e()),q=_e[z]&&_e[z][I]),typeof q>"u"||!q.length||!q[0]){var ke="";ye=[];for(ge in _e[z])this.terminals_[ge]&&ge>Be&&ye.push("'"+this.terminals_[ge]+"'");S.showPosition?ke="Parse error on line "+(pe+1)+`:
2
+ `+S.showPosition()+`
3
+ Expecting `+ye.join(", ")+", got '"+(this.terminals_[I]||I)+"'":ke="Parse error on line "+(pe+1)+": Unexpected "+(I==Fe?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(ke,{text:S.match,token:this.terminals_[I]||I,line:S.yylineno,loc:Ie,expected:ye})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+I);switch(q[0]){case 1:c.push(I),R.push(S.yytext),t.push(S.yylloc),c.push(q[1]),I=null,Me=S.yyleng,l=S.yytext,pe=S.yylineno,Ie=S.yylloc;break;case 2:if(F=this.productions_[q[1]][1],J.$=R[R.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},He&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Te=this.performAction.apply(J,[l,Me,pe,G.yy,q[1],R,t].concat(Qe)),typeof Te<"u")return Te;F&&(c=c.slice(0,-1*F*2),R=R.slice(0,-1*F),t=t.slice(0,-1*F)),c.push(this.productions_[q[1]][0]),R.push(J.$),t.push(J._$),Pe=_e[c[c.length-2]][c[c.length-1]],c.push(Pe);break;case 3:return!0}}return!0},"parse")},Ye=function(){var $={EOF:1,parseError:r.__name(function(a,c){if(this.yy.parser)this.yy.parser.parseError(a,c);else throw new Error(a)},"parseError"),setInput:r.__name(function(i,a){return this.yy=a||this.yy||{},this._input=i,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:r.__name(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),i},"input"),unput:r.__name(function(i){var a=i.length,c=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;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),c.length-1&&(this.yylineno-=c.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:c?(c.length===s.length?this.yylloc.first_column:0)+s[s.length-c.length].length-c[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:r.__name(function(){return this._more=!0,this},"more"),reject:r.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:r.__name(function(i){this.unput(this.match.slice(i))},"less"),pastInput:r.__name(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r.__name(function(){var i=this.match;return i.length<20&&(i+=this._input.substr(0,20-i.length)),(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r.__name(function(){var i=this.pastInput(),a=new Array(i.length+1).join("-");return i+this.upcomingInput()+`
5
+ `+a+"^"},"showPosition"),test_match:r.__name(function(i,a){var c,s,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))),s=i[0].match(/(?:\r\n?|\n).*/g),s&&(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+i[0].length},this.yytext+=i[0],this.match+=i[0],this.matches=i,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(i[0].length),this.matched+=i[0],c=this.performAction.call(this,this.yy,this,a,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var t in R)this[t]=R[t];return!1}return!1},"test_match"),next:r.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var i,a,c,s;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),t=0;t<R.length;t++)if(c=this._input.match(this.rules[R[t]]),c&&(!a||c[0].length>a[0].length)){if(a=c,s=t,this.options.backtrack_lexer){if(i=this.test_match(c,R[t]),i!==!1)return i;if(this._backtrack){a=!1;continue}else return!1}else if(!this.options.flex)break}return a?(i=this.test_match(a,R[s]),i!==!1?i:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:r.__name(function(){var a=this.next();return a||this.lex()},"lex"),begin:r.__name(function(a){this.conditionStack.push(a)},"begin"),popState:r.__name(function(){var a=this.conditionStack.length-1;return a>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:r.__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:r.__name(function(a){return a=this.conditionStack.length-1-Math.abs(a||0),a>=0?this.conditionStack[a]:"INITIAL"},"topState"),pushState:r.__name(function(a){this.begin(a)},"pushState"),stateStackSize:r.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:r.__name(function(a,c,s,R){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:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin("style"),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return"PERCENT";case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin("string");break;case 58:this.popState();break;case 59:return this.begin("style"),72;case 60:return this.begin("style"),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin("string");break;case 65:this.popState();break;case 66:return"qString";case 67:return c.yytext=c.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},"anonymous"),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}};return $}();Se.lexer=Ye;function Re(){this.yy={}}return r.__name(Re,"Parser"),Re.prototype=Se,Se.Parser=Re,new Re}();Ne.parser=Ne;var Ge=Ne,Z,ze=(Z=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.setAccTitle,this.getAccTitle=r.getAccTitle,this.setAccDescription=r.setAccDescription,this.getAccDescription=r.getAccDescription,this.setDiagramTitle=r.setDiagramTitle,this.getDiagramTitle=r.getDiagramTitle,this.getConfig=r.__name(()=>r.getConfig2().requirement,"getConfig"),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}getDirection(){return this.direction}setDirection(n){this.direction=n}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(n,m){return this.requirements.has(n)||this.requirements.set(n,{name:n,type:m,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(n)}getRequirements(){return this.requirements}setNewReqId(n){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=n)}setNewReqText(n){this.latestRequirement!==void 0&&(this.latestRequirement.text=n)}setNewReqRisk(n){this.latestRequirement!==void 0&&(this.latestRequirement.risk=n)}setNewReqVerifyMethod(n){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=n)}addElement(n){return this.elements.has(n)||(this.elements.set(n,{name:n,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),r.log.info("Added new element: ",n)),this.resetLatestElement(),this.elements.get(n)}getElements(){return this.elements}setNewElementType(n){this.latestElement!==void 0&&(this.latestElement.type=n)}setNewElementDocRef(n){this.latestElement!==void 0&&(this.latestElement.docRef=n)}addRelationship(n,m,u){this.relations.push({type:n,src:m,dst:u})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,r.clear()}setCssStyle(n,m){for(const u of n){const h=this.requirements.get(u)??this.elements.get(u);if(!m||!h)return;for(const o of m)o.includes(",")?h.cssStyles.push(...o.split(",")):h.cssStyles.push(o)}}setClass(n,m){var u;for(const h of n){const o=this.requirements.get(h)??this.elements.get(h);if(o)for(const d of m){o.classes.push(d);const E=(u=this.classes.get(d))==null?void 0:u.styles;E&&o.cssStyles.push(...E)}}}defineClass(n,m){for(const u of n){let h=this.classes.get(u);h===void 0&&(h={id:u,styles:[],textStyles:[]},this.classes.set(u,h)),m&&m.forEach(function(o){if(/color/.exec(o)){const d=o.replace("fill","bgFill");h.textStyles.push(d)}h.styles.push(o)}),this.requirements.forEach(o=>{o.classes.includes(u)&&o.cssStyles.push(...m.flatMap(d=>d.split(",")))}),this.elements.forEach(o=>{o.classes.includes(u)&&o.cssStyles.push(...m.flatMap(d=>d.split(",")))})}}getClasses(){return this.classes}getData(){var h,o,d,E;const n=r.getConfig2(),m=[],u=[];for(const f of this.requirements.values()){const _=f;_.id=f.name,_.cssStyles=f.cssStyles,_.cssClasses=f.classes.join(" "),_.shape="requirementBox",_.look=n.look,_.colorIndex=m.length,m.push(_)}for(const f of this.elements.values()){const _=f;_.shape="requirementBox",_.look=n.look,_.id=f.name,_.cssStyles=f.cssStyles,_.cssClasses=f.classes.join(" "),_.colorIndex=m.length,m.push(_)}for(const f of this.relations){let _=0;const b=f.type===this.Relationships.CONTAINS,k={id:`${f.src}-${f.dst}-${_}`,start:((h=this.requirements.get(f.src))==null?void 0:h.name)??((o=this.elements.get(f.src))==null?void 0:o.name),end:((d=this.requirements.get(f.dst))==null?void 0:d.name)??((E=this.elements.get(f.dst))==null?void 0:E.name),label:`&lt;&lt;${f.type}&gt;&gt;`,classes:"relationshipLine",style:["fill:none",b?"":"stroke-dasharray: 10,7"],labelpos:"c",thickness:"normal",type:"normal",pattern:b?"normal":"dashed",arrowTypeStart:b?"requirement_contains":"",arrowTypeEnd:b?"":"requirement_arrow",look:n.look,labelType:"markdown"};u.push(k),_++}return{nodes:m,edges:u,other:{},config:n,direction:this.getDirection()}}},r.__name(Z,"RequirementDB"),Z),Xe=r.__name(e=>{const n=r.getConfig(),{themeVariables:m,look:u}=n,{bkgColorArray:h,borderColorArray:o}=m;if(!(o!=null&&o.length))return"";let d="";for(let E=0;E<e.THEME_COLOR_LIMIT;E++)d+=`
7
+
8
+ [data-look="${u}"][data-color-id="color-${E}"].node path {
9
+ stroke: ${o[E]};
10
+ fill: ${h!=null&&h.length?h[E]:""};
11
+ }
12
+
13
+ [data-look="${u}"][data-color-id="color-${E}"].node rect {
14
+ stroke: ${o[E]};
15
+ fill: ${h!=null&&h.length?h[E]:""};
16
+ }
17
+ `;return d},"genColor"),Je=r.__name(e=>{const n=r.getConfig(),{look:m,themeVariables:u}=n,{requirementEdgeLabelBackground:h}=u;return`
18
+ ${Xe(e)}
19
+ marker {
20
+ fill: ${e.relationColor};
21
+ stroke: ${e.relationColor};
22
+ }
23
+
24
+ marker.cross {
25
+ stroke: ${e.lineColor};
26
+ }
27
+
28
+ svg {
29
+ font-family: ${e.fontFamily};
30
+ font-size: ${e.fontSize};
31
+ }
32
+
33
+ .reqBox {
34
+ fill: ${e.requirementBackground};
35
+ fill-opacity: 1.0;
36
+ stroke: ${e.requirementBorderColor};
37
+ stroke-width: ${e.requirementBorderSize};
38
+ }
39
+
40
+ .reqTitle, .reqLabel{
41
+ fill: ${e.requirementTextColor};
42
+ }
43
+ .reqLabelBox {
44
+ fill: ${e.relationLabelBackground};
45
+ fill-opacity: 1.0;
46
+ }
47
+
48
+ .req-title-line {
49
+ stroke: ${e.requirementBorderColor};
50
+ stroke-width: ${e.requirementBorderSize};
51
+ }
52
+ .relationshipLine {
53
+ stroke: ${e.relationColor};
54
+ stroke-width: ${m==="neo"?e.strokeWidth:"1px"};
55
+ }
56
+ .relationshipLabel {
57
+ fill: ${e.relationLabelColor};
58
+ }
59
+ .edgeLabel {
60
+ background-color: ${e.edgeLabelBackground};
61
+ }
62
+ .edgeLabel .label rect {
63
+ fill: ${e.edgeLabelBackground};
64
+ }
65
+ .edgeLabel .label text {
66
+ fill: ${e.relationLabelColor};
67
+ }
68
+ .divider {
69
+ stroke: ${e.nodeBorder};
70
+ stroke-width: 1;
71
+ }
72
+ .label {
73
+ font-family: ${e.fontFamily};
74
+ color: ${e.nodeTextColor||e.textColor};
75
+ }
76
+ .label text,span {
77
+ fill: ${e.nodeTextColor||e.textColor};
78
+ color: ${e.nodeTextColor||e.textColor};
79
+ }
80
+ .labelBkg {
81
+ background-color: ${h??e.edgeLabelBackground};
82
+ }
83
+
84
+ `},"getStyles"),Ze=Je,Ue={};r.__export(Ue,{draw:()=>et});var et=r.__name(async function(e,n,m,u){r.log.info("REF0:"),r.log.info("Drawing requirement diagram (unified)",n);const{securityLevel:h,state:o,layout:d,look:E}=r.getConfig2(),f=u.db.getData(),_=We.getDiagramElement(n,h);f.type=u.type,f.layoutAlgorithm=r.getRegisteredLayoutAlgorithm(d),f.nodeSpacing=(o==null?void 0:o.nodeSpacing)??50,f.rankSpacing=(o==null?void 0:o.rankSpacing)??50,f.markers=E==="neo"?["requirement_contains_neo","requirement_arrow_neo"]:["requirement_contains","requirement_arrow"],f.diagramId=n,await r.render(f,_);const b=8;r.utils_default.insertTitle(_,"requirementDiagramTitleText",(o==null?void 0:o.titleTopMargin)??25,u.db.getDiagramTitle()),je.setupViewPortForSVG(_,b,"requirementDiagram",(o==null?void 0:o.useMaxWidth)??!0)},"draw"),tt={parser:Ge,get db(){return new ze},renderer:Ue,styles:Ze};exports.diagram=tt;
@@ -0,0 +1,40 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./mermaid.core-BzNKr-OJ.cjs"),_t=require("./ordinal-CagbB1m8.cjs");function mt(t){for(var n=t.length/6|0,s=new Array(n),a=0;a<n;)s[a]="#"+t.slice(a*6,++a*6);return s}const kt=mt("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function at(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s<a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let h of t)(h=n(h,++a,t))!=null&&(s<h||s===void 0&&h>=h)&&(s=h)}return s}function dt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let h of t)(h=n(h,++a,t))!=null&&(s>h||s===void 0&&h>=h)&&(s=h)}return s}function et(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let h of t)(h=+n(h,++a,t))&&(s+=h)}return s}function xt(t){return t.target.depth}function vt(t){return t.depth}function bt(t,n){return n-1-t.height}function gt(t,n){return t.sourceLinks.length?t.depth:n-1}function St(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?dt(t.sourceLinks,xt)-1:0}function H(t){return function(){return t}}function lt(t,n){return X(t.source,n.source)||t.index-n.index}function ct(t,n){return X(t.target,n.target)||t.index-n.index}function X(t,n){return t.y0-n.y0}function nt(t){return t.value}function wt(t){return t.index}function Lt(t){return t.nodes}function Et(t){return t.links}function ut(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function ht({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const h of n.sourceLinks)h.y0=s+h.width/2,s+=h.width;for(const h of n.targetLinks)h.y1=a+h.width/2,a+=h.width}}function At(){let t=0,n=0,s=1,a=1,h=24,d=8,p,m=wt,o=gt,l,f,k=Lt,x=Et,g=6;function v(){const i={nodes:k.apply(null,arguments),links:x.apply(null,arguments)};return T(i),A(i),M(i),$(i),S(i),ht(i),i}v.update=function(i){return ht(i),i},v.nodeId=function(i){return arguments.length?(m=typeof i=="function"?i:H(i),v):m},v.nodeAlign=function(i){return arguments.length?(o=typeof i=="function"?i:H(i),v):o},v.nodeSort=function(i){return arguments.length?(l=i,v):l},v.nodeWidth=function(i){return arguments.length?(h=+i,v):h},v.nodePadding=function(i){return arguments.length?(d=p=+i,v):d},v.nodes=function(i){return arguments.length?(k=typeof i=="function"?i:H(i),v):k},v.links=function(i){return arguments.length?(x=typeof i=="function"?i:H(i),v):x},v.linkSort=function(i){return arguments.length?(f=i,v):f},v.size=function(i){return arguments.length?(t=n=0,s=+i[0],a=+i[1],v):[s-t,a-n]},v.extent=function(i){return arguments.length?(t=+i[0][0],s=+i[1][0],n=+i[0][1],a=+i[1][1],v):[[t,n],[s,a]]},v.iterations=function(i){return arguments.length?(g=+i,v):g};function T({nodes:i,links:y}){for(const[e,r]of i.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(i.map((e,r)=>[m(e,r,i),e]));for(const[e,r]of y.entries()){r.index=e;let{source:_,target:b}=r;typeof _!="object"&&(_=r.source=ut(c,_)),typeof b!="object"&&(b=r.target=ut(c,b)),_.sourceLinks.push(r),b.targetLinks.push(r)}if(f!=null)for(const{sourceLinks:e,targetLinks:r}of i)e.sort(f),r.sort(f)}function A({nodes:i}){for(const y of i)y.value=y.fixedValue===void 0?Math.max(et(y.sourceLinks,nt),et(y.targetLinks,nt)):y.fixedValue}function M({nodes:i}){const y=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const _ of c){_.depth=r;for(const{target:b}of _.sourceLinks)e.add(b)}if(++r>y)throw new Error("circular link");c=e,e=new Set}}function $({nodes:i}){const y=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const _ of c){_.height=r;for(const{source:b}of _.targetLinks)e.add(b)}if(++r>y)throw new Error("circular link");c=e,e=new Set}}function C({nodes:i}){const y=at(i,r=>r.depth)+1,c=(s-t-h)/(y-1),e=new Array(y);for(const r of i){const _=Math.max(0,Math.min(y-1,Math.floor(o.call(null,r,y))));r.layer=_,r.x0=t+_*c,r.x1=r.x0+h,e[_]?e[_].push(r):e[_]=[r]}if(l)for(const r of e)r.sort(l);return e}function D(i){const y=dt(i,c=>(a-n-(c.length-1)*p)/et(c,nt));for(const c of i){let e=n;for(const r of c){r.y0=e,r.y1=e+r.value*y,e=r.y1+p;for(const _ of r.sourceLinks)_.width=_.value*y}e=(a-e+p)/(c.length+1);for(let r=0;r<c.length;++r){const _=c[r];_.y0+=e*(r+1),_.y1+=e*(r+1)}w(c)}}function S(i){const y=C(i);p=Math.min(d,(a-n)/(at(y,c=>c.length)-1)),D(y);for(let c=0;c<g;++c){const e=Math.pow(.99,c),r=Math.max(1-e,(c+1)/g);R(y,e,r),N(y,e,r)}}function N(i,y,c){for(let e=1,r=i.length;e<r;++e){const _=i[e];for(const b of _){let L=0,B=0;for(const{source:q,value:tt}of b.targetLinks){let Y=tt*(b.layer-q.layer);L+=P(q,b)*Y,B+=Y}if(!(B>0))continue;let U=(L/B-b.y0)*y;b.y0+=U,b.y1+=U,z(b)}l===void 0&&_.sort(X),j(_,c)}}function R(i,y,c){for(let e=i.length,r=e-2;r>=0;--r){const _=i[r];for(const b of _){let L=0,B=0;for(const{target:q,value:tt}of b.sourceLinks){let Y=tt*(q.layer-b.layer);L+=E(b,q)*Y,B+=Y}if(!(B>0))continue;let U=(L/B-b.y0)*y;b.y0+=U,b.y1+=U,z(b)}l===void 0&&_.sort(X),j(_,c)}}function j(i,y){const c=i.length>>1,e=i[c];I(i,e.y0-p,c-1,y),V(i,e.y1+p,c+1,y),I(i,a,i.length-1,y),V(i,n,0,y)}function V(i,y,c,e){for(;c<i.length;++c){const r=i[c],_=(y-r.y0)*e;_>1e-6&&(r.y0+=_,r.y1+=_),y=r.y1+p}}function I(i,y,c,e){for(;c>=0;--c){const r=i[c],_=(r.y1-y)*e;_>1e-6&&(r.y0-=_,r.y1-=_),y=r.y0-p}}function z({sourceLinks:i,targetLinks:y}){if(f===void 0){for(const{source:{sourceLinks:c}}of y)c.sort(ct);for(const{target:{targetLinks:c}}of i)c.sort(lt)}}function w(i){if(f===void 0)for(const{sourceLinks:y,targetLinks:c}of i)y.sort(ct),c.sort(lt)}function P(i,y){let c=i.y0-(i.sourceLinks.length-1)*p/2;for(const{target:e,width:r}of i.sourceLinks){if(e===y)break;c+=r+p}for(const{source:e,width:r}of y.targetLinks){if(e===i)break;c-=r}return c}function E(i,y){let c=y.y0-(y.targetLinks.length-1)*p/2;for(const{source:e,width:r}of y.targetLinks){if(e===i)break;c+=r+p}for(const{target:e,width:r}of i.sourceLinks){if(e===y)break;c-=r}return c}return v}var it=Math.PI,rt=2*it,F=1e-6,Tt=rt-F;function st(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pt(){return new st}st.prototype=pt.prototype={constructor:st,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,h,d){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+h)+","+(this._y1=+d)},arcTo:function(t,n,s,a,h){t=+t,n=+n,s=+s,a=+a,h=+h;var d=this._x1,p=this._y1,m=s-t,o=a-n,l=d-t,f=p-n,k=l*l+f*f;if(h<0)throw new Error("negative radius: "+h);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(k>F)if(!(Math.abs(f*m-o*l)>F)||!h)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var x=s-d,g=a-p,v=m*m+o*o,T=x*x+g*g,A=Math.sqrt(v),M=Math.sqrt(k),$=h*Math.tan((it-Math.acos((v+k-T)/(2*A*M)))/2),C=$/M,D=$/A;Math.abs(C-1)>F&&(this._+="L"+(t+C*l)+","+(n+C*f)),this._+="A"+h+","+h+",0,0,"+ +(f*x>l*g)+","+(this._x1=t+D*m)+","+(this._y1=n+D*o)}},arc:function(t,n,s,a,h,d){t=+t,n=+n,s=+s,d=!!d;var p=s*Math.cos(a),m=s*Math.sin(a),o=t+p,l=n+m,f=1^d,k=d?a-h:h-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+l:(Math.abs(this._x1-o)>F||Math.abs(this._y1-l)>F)&&(this._+="L"+o+","+l),s&&(k<0&&(k=k%rt+rt),k>Tt?this._+="A"+s+","+s+",0,1,"+f+","+(t-p)+","+(n-m)+"A"+s+","+s+",0,1,"+f+","+(this._x1=o)+","+(this._y1=l):k>F&&(this._+="A"+s+","+s+",0,"+ +(k>=it)+","+f+","+(this._x1=t+s*Math.cos(h))+","+(this._y1=n+s*Math.sin(h))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function ft(t){return function(){return t}}function Mt(t){return t[0]}function Ct(t){return t[1]}var Nt=Array.prototype.slice;function Pt(t){return t.source}function $t(t){return t.target}function It(t){var n=Pt,s=$t,a=Mt,h=Ct,d=null;function p(){var m,o=Nt.call(arguments),l=n.apply(this,o),f=s.apply(this,o);if(d||(d=m=pt()),t(d,+a.apply(this,(o[0]=l,o)),+h.apply(this,o),+a.apply(this,(o[0]=f,o)),+h.apply(this,o)),m)return d=null,m+""||null}return p.source=function(m){return arguments.length?(n=m,p):n},p.target=function(m){return arguments.length?(s=m,p):s},p.x=function(m){return arguments.length?(a=typeof m=="function"?m:ft(+m),p):a},p.y=function(m){return arguments.length?(h=typeof m=="function"?m:ft(+m),p):h},p.context=function(m){return arguments.length?(d=m??null,p):d},p}function Ot(t,n,s,a,h){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,h,a,h)}function Dt(){return It(Ot)}function jt(t){return[t.source.x1,t.y0]}function zt(t){return[t.target.x0,t.y1]}function Bt(){return Dt().source(jt).target(zt)}var ot=function(){var t=u.__name(function(m,o,l,f){for(l=l||{},f=m.length;f--;l[m[f]]=o);return l},"o"),n=[1,9],s=[1,10],a=[1,5,10,12],h={trace:u.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:u.__name(function(o,l,f,k,x,g,v){var T=g.length-1;switch(x){case 7:const A=k.findOrCreateNode(g[T-4].trim().replaceAll('""','"')),M=k.findOrCreateNode(g[T-2].trim().replaceAll('""','"')),$=parseFloat(g[T].trim());k.addLink(A,M,$);break;case 8:case 9:case 11:this.$=g[T];break;case 10:this.$=g[T-1];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:u.__name(function(o,l){if(l.recoverable)this.trace(o);else{var f=new Error(o);throw f.hash=l,f}},"parseError"),parse:u.__name(function(o){var l=this,f=[0],k=[],x=[null],g=[],v=this.table,T="",A=0,M=0,$=2,C=1,D=g.slice.call(arguments,1),S=Object.create(this.lexer),N={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(N.yy[R]=this.yy[R]);S.setInput(o,N.yy),N.yy.lexer=S,N.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var j=S.yylloc;g.push(j);var V=S.options&&S.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function I(L){f.length=f.length-2*L,x.length=x.length-L,g.length=g.length-L}u.__name(I,"popStack");function z(){var L;return L=k.pop()||S.lex()||C,typeof L!="number"&&(L instanceof Array&&(k=L,L=k.pop()),L=l.symbols_[L]||L),L}u.__name(z,"lex");for(var w,P,E,i,y={},c,e,r,_;;){if(P=f[f.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=z()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";_=[];for(c in v[P])this.terminals_[c]&&c>$&&_.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`:
2
+ `+S.showPosition()+`
3
+ Expecting `+_.join(", ")+", got '"+(this.terminals_[w]||w)+"'":b="Parse error on line "+(A+1)+": Unexpected "+(w==C?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(b,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:j,expected:_})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+w);switch(E[0]){case 1:f.push(w),x.push(S.yytext),g.push(S.yylloc),f.push(E[1]),w=null,M=S.yyleng,T=S.yytext,A=S.yylineno,j=S.yylloc;break;case 2:if(e=this.productions_[E[1]][1],y.$=x[x.length-e],y._$={first_line:g[g.length-(e||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(e||1)].first_column,last_column:g[g.length-1].last_column},V&&(y._$.range=[g[g.length-(e||1)].range[0],g[g.length-1].range[1]]),i=this.performAction.apply(y,[T,M,A,N.yy,E[1],x,g].concat(D)),typeof i<"u")return i;e&&(f=f.slice(0,-1*e*2),x=x.slice(0,-1*e),g=g.slice(0,-1*e)),f.push(this.productions_[E[1]][0]),x.push(y.$),g.push(y._$),r=v[f[f.length-2]][f[f.length-1]],f.push(r);break;case 3:return!0}}return!0},"parse")},d=function(){var m={EOF:1,parseError:u.__name(function(l,f){if(this.yy.parser)this.yy.parser.parseError(l,f);else throw new Error(l)},"parseError"),setInput:u.__name(function(o,l){return this.yy=l||this.yy||{},this._input=o,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:u.__name(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.match(/(?:\r\n?|\n).*/g);return l?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:u.__name(function(o){var l=o.length,f=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;var k=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),f.length-1&&(this.yylineno-=f.length-1);var x=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:f?(f.length===k.length?this.yylloc.first_column:0)+k[k.length-f.length].length-f[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[x[0],x[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:u.__name(function(){return this._more=!0,this},"more"),reject:u.__name(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u.__name(function(o){this.unput(this.match.slice(o))},"less"),pastInput:u.__name(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u.__name(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u.__name(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
5
+ `+l+"^"},"showPosition"),test_match:u.__name(function(o,l){var f,k,x;if(this.options.backtrack_lexer&&(x={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&&(x.yylloc.range=this.yylloc.range.slice(0))),k=o[0].match(/(?:\r\n?|\n).*/g),k&&(this.yylineno+=k.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,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(o[0].length),this.matched+=o[0],f=this.performAction.call(this,this.yy,this,l,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var g in x)this[g]=x[g];return!1}return!1},"test_match"),next:u.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,l,f,k;this._more||(this.yytext="",this.match="");for(var x=this._currentRules(),g=0;g<x.length;g++)if(f=this._input.match(this.rules[x[g]]),f&&(!l||f[0].length>l[0].length)){if(l=f,k=g,this.options.backtrack_lexer){if(o=this.test_match(f,x[g]),o!==!1)return o;if(this._backtrack){l=!1;continue}else return!1}else if(!this.options.flex)break}return l?(o=this.test_match(l,x[k]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
+ `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:u.__name(function(){var l=this.next();return l||this.lex()},"lex"),begin:u.__name(function(l){this.conditionStack.push(l)},"begin"),popState:u.__name(function(){var l=this.conditionStack.length-1;return l>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:u.__name(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:u.__name(function(l){return l=this.conditionStack.length-1-Math.abs(l||0),l>=0?this.conditionStack[l]:"INITIAL"},"topState"),pushState:u.__name(function(l){this.begin(l)},"pushState"),stateStackSize:u.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:u.__name(function(l,f,k,x){switch(k){case 0:return this.pushState("csv"),4;case 1:return this.pushState("csv"),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState("escaped_text"),18;case 6:return 20;case 7:return this.popState("escaped_text"),18;case 8:return 19}},"anonymous"),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}};return m}();h.lexer=d;function p(){this.yy={}}return u.__name(p,"Parser"),p.prototype=h,h.Parser=p,new p}();ot.parser=ot;var Q=ot,Z=[],J=[],K=new Map,Ft=u.__name(()=>{Z=[],J=[],K=new Map,u.clear()},"clear"),W,Rt=(W=class{constructor(n,s,a=0){this.source=n,this.target=s,this.value=a}},u.__name(W,"SankeyLink"),W),Vt=u.__name((t,n,s)=>{Z.push(new Rt(t,n,s))},"addLink"),G,Wt=(G=class{constructor(n){this.ID=n}},u.__name(G,"SankeyNode"),G),Gt=u.__name(t=>{t=u.common_default.sanitizeText(t,u.getConfig2());let n=K.get(t);return n===void 0&&(n=new Wt(t),K.set(t,n),J.push(n)),n},"findOrCreateNode"),Ut=u.__name(()=>J,"getNodes"),qt=u.__name(()=>Z,"getLinks"),Yt=u.__name(()=>({nodes:J.map(t=>({id:t.ID})),links:Z.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),Ht={nodesMap:K,getConfig:u.__name(()=>u.getConfig2().sankey,"getConfig"),getNodes:Ut,getLinks:qt,getGraph:Yt,addLink:Vt,findOrCreateNode:Gt,getAccTitle:u.getAccTitle,setAccTitle:u.setAccTitle,getAccDescription:u.getAccDescription,setAccDescription:u.setAccDescription,getDiagramTitle:u.getDiagramTitle,setDiagramTitle:u.setDiagramTitle,clear:Ft},O,yt=(O=class{static next(n){return new O(n+ ++O.count)}constructor(n){this.id=n,this.href=`#${n}`}toString(){return"url("+this.href+")"}},u.__name(O,"Uid"),O.count=0,O),Xt={left:vt,right:bt,center:St,justify:gt},Qt=u.__name(t=>{let n=0,s=0;for(const a of t){const h=a.value??0;h>n&&(n=h,s=a.layer??0)}return s},"findCentralNodeLayer"),Kt=u.__name(function(t,n,s,a){const{securityLevel:h,sankey:d}=u.getConfig2(),p=u.defaultConfig2.sankey;let m;h==="sandbox"&&(m=u.select("#i"+n));const o=h==="sandbox"?u.select(m.nodes()[0].contentDocument.body):u.select("body"),l=h==="sandbox"?o.select(`[id="${n}"]`):u.select(`[id="${n}"]`),f=(d==null?void 0:d.width)??p.width,k=(d==null?void 0:d.height)??p.width,x=(d==null?void 0:d.useMaxWidth)??p.useMaxWidth,g=(d==null?void 0:d.nodeAlignment)??p.nodeAlignment,v=(d==null?void 0:d.prefix)??p.prefix,T=(d==null?void 0:d.suffix)??p.suffix,A=(d==null?void 0:d.showValues)??p.showValues,M=(d==null?void 0:d.nodeWidth)??p.nodeWidth??10,$=(d==null?void 0:d.nodePadding)??p.nodePadding??12,C=(d==null?void 0:d.labelStyle)??p.labelStyle??"legacy",D=(d==null?void 0:d.nodeColors)??{},S=a.db.getGraph(),N=Xt[g];At().nodeId(e=>e.id).nodeWidth(M).nodePadding($+(A?15:0)).nodeAlign(N).extent([[0,0],[f,k]])(S);const j=Qt(S.nodes),V=_t.ordinal(kt),I=u.__name(e=>D[e]??V(e),"getNodeColor");l.append("g").attr("class","nodes").selectAll(".node").data(S.nodes).join("g").attr("class","node").attr("id",e=>(e.uid=yt.next("node-")).id).attr("transform",function(e){return"translate("+e.x0+","+e.y0+")"}).attr("x",e=>e.x0).attr("y",e=>e.y0).append("rect").attr("height",e=>e.y1-e.y0).attr("width",e=>e.x1-e.x0).attr("fill",e=>I(e.id));const z=u.__name(({id:e,value:r})=>A?`${e}
7
+ ${v}${Math.round(r*100)/100}${T}`:e,"getText"),w=u.__name(e=>C==="outlined"?(e.layer??0)<j?{x:e.x0-6,anchor:"end"}:{x:e.x1+6,anchor:"start"}:e.x0<f/2?{x:e.x1+6,anchor:"start"}:{x:e.x0-6,anchor:"end"},"getLabelPosition"),P=l.append("g").attr("class","node-labels").attr("font-size",14),E=u.__name(e=>P.selectAll(e?`.${e}`:"text").data(S.nodes).join("text").attr("class",e??null).attr("x",r=>w(r).x).attr("y",r=>(r.y1+r.y0)/2).attr("dy",`${A?"0":"0.35"}em`).attr("text-anchor",r=>w(r).anchor).text(z),"appendLabel");C==="outlined"?(E("sankey-label-bg"),E("sankey-label-fg")):E();const i=l.append("g").attr("class","links").attr("fill","none").attr("stroke-opacity",.5).selectAll(".link").data(S.links).join("g").attr("class","link").style("mix-blend-mode","multiply"),y=(d==null?void 0:d.linkColor)??"gradient";if(y==="gradient"){const e=i.append("linearGradient").attr("id",r=>(r.uid=yt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",r=>r.source.x1).attr("x2",r=>r.target.x0);e.append("stop").attr("offset","0%").attr("stop-color",r=>I(r.source.id)),e.append("stop").attr("offset","100%").attr("stop-color",r=>I(r.target.id))}let c;switch(y){case"gradient":c=u.__name(e=>e.uid,"coloring");break;case"source":c=u.__name(e=>I(e.source.id),"coloring");break;case"target":c=u.__name(e=>I(e.target.id),"coloring");break;default:c=y}i.append("path").attr("d",Bt()).attr("stroke",c).attr("stroke-width",e=>Math.max(1,e.width)),u.setupGraphViewbox(void 0,l,0,x)},"draw"),Zt={draw:Kt},Jt=u.__name(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,`
8
+ `).trim(),"prepareTextForParsing"),te=u.__name(t=>`.label {
9
+ font-family: ${t.fontFamily};
10
+ }
11
+
12
+ .node-labels {
13
+ font-family: ${t.fontFamily};
14
+ }
15
+
16
+ /* Outlined label style - background stroke for better readability */
17
+ .sankey-label-bg {
18
+ stroke: ${t.mainBkg||t.background||"#fff"};
19
+ stroke-width: 4px;
20
+ stroke-linejoin: round;
21
+ paint-order: stroke;
22
+ }
23
+
24
+ /* Foreground label text */
25
+ .sankey-label-fg {
26
+ fill: ${t.textColor};
27
+ }
28
+
29
+ /* Node styling */
30
+ .node rect {
31
+ shape-rendering: crispEdges;
32
+ }
33
+
34
+ /* Link styling */
35
+ .link {
36
+ fill: none;
37
+ stroke-opacity: 0.5;
38
+ mix-blend-mode: multiply;
39
+ }
40
+ `,"getStyles"),ee=te,ne=Q.parse.bind(Q);Q.parse=t=>ne(Jt(t));var ie={styles:ee,parser:Q,db:Ht,renderer:Zt};exports.diagram=ie;