@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,139 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ft=require("./chunk-FMBD7UC4-DOxtd0OO.cjs"),j=require("./chunk-ND2GUHAM-BXeDBtSC.cjs"),n=require("./mermaid.core-BzNKr-OJ.cjs"),et=require("./arc-BJMRTG9S.cjs");var U=function(){var t=n.__name(function(h,a,r,l){for(r=r||{},l=h.length;l--;r[h[l]]=a);return r},"o"),e=[6,8,10,11,12,14,16,17,18],s=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],_={trace:n.__name(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:n.__name(function(a,r,l,d,y,c,v){var x=c.length-1;switch(y){case 1:return c[x-1];case 2:this.$=[];break;case 3:c[x-1].push(c[x]),this.$=c[x-1];break;case 4:case 5:this.$=c[x];break;case 6:case 7:this.$=[];break;case 8:d.setDiagramTitle(c[x].substr(6)),this.$=c[x].substr(6);break;case 9:this.$=c[x].trim(),d.setAccTitle(this.$);break;case 10:case 11:this.$=c[x].trim(),d.setAccDescription(this.$);break;case 12:d.addSection(c[x].substr(8)),this.$=c[x].substr(8);break;case 13:d.addTask(c[x-1],c[x]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:s,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:s,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:n.__name(function(a,r){if(r.recoverable)this.trace(a);else{var l=new Error(a);throw l.hash=r,l}},"parseError"),parse:n.__name(function(a){var r=this,l=[0],d=[],y=[null],c=[],v=this.table,x="",E=0,J=0,ht=2,K=1,ut=c.slice.call(arguments,1),k=Object.create(this.lexer),A={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(A.yy[O]=this.yy[O]);k.setInput(a,A.yy),A.yy.lexer=k,A.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var q=k.yylloc;c.push(q);var dt=k.options&&k.options.ranges;typeof A.yy.parseError=="function"?this.parseError=A.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(w){l.length=l.length-2*w,y.length=y.length-w,c.length=c.length-w}n.__name(yt,"popStack");function Q(){var w;return w=d.pop()||k.lex()||K,typeof w!="number"&&(w instanceof Array&&(d=w,w=d.pop()),w=r.symbols_[w]||w),w}n.__name(Q,"lex");for(var b,I,$,Y,F={},N,M,tt,z;;){if(I=l[l.length-1],this.defaultActions[I]?$=this.defaultActions[I]:((b===null||typeof b>"u")&&(b=Q()),$=v[I]&&v[I][b]),typeof $>"u"||!$.length||!$[0]){var G="";z=[];for(N in v[I])this.terminals_[N]&&N>ht&&z.push("'"+this.terminals_[N]+"'");k.showPosition?G="Parse error on line "+(E+1)+`:
2
+ `+k.showPosition()+`
3
+ Expecting `+z.join(", ")+", got '"+(this.terminals_[b]||b)+"'":G="Parse error on line "+(E+1)+": Unexpected "+(b==K?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(G,{text:k.match,token:this.terminals_[b]||b,line:k.yylineno,loc:q,expected:z})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+b);switch($[0]){case 1:l.push(b),y.push(k.yytext),c.push(k.yylloc),l.push($[1]),b=null,J=k.yyleng,x=k.yytext,E=k.yylineno,q=k.yylloc;break;case 2:if(M=this.productions_[$[1]][1],F.$=y[y.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},dt&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),Y=this.performAction.apply(F,[x,J,E,A.yy,$[1],y,c].concat(ut)),typeof Y<"u")return Y;M&&(l=l.slice(0,-1*M*2),y=y.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[$[1]][0]),y.push(F.$),c.push(F._$),tt=v[l[l.length-2]][l[l.length-1]],l.push(tt);break;case 3:return!0}}return!0},"parse")},g=function(){var h={EOF:1,parseError:n.__name(function(r,l){if(this.yy.parser)this.yy.parser.parseError(r,l);else throw new Error(r)},"parseError"),setInput:n.__name(function(a,r){return this.yy=r||this.yy||{},this._input=a,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:n.__name(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var r=a.match(/(?:\r\n?|\n).*/g);return r?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:n.__name(function(a){var r=a.length,l=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-r),this.offset-=r;var d=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),l.length-1&&(this.yylineno-=l.length-1);var y=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:l?(l.length===d.length?this.yylloc.first_column:0)+d[d.length-l.length].length-l[0].length:this.yylloc.first_column-r},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-r]),this.yyleng=this.yytext.length,this},"unput"),more:n.__name(function(){return this._more=!0,this},"more"),reject:n.__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:n.__name(function(a){this.unput(this.match.slice(a))},"less"),pastInput:n.__name(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n.__name(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n.__name(function(){var a=this.pastInput(),r=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
5
+ `+r+"^"},"showPosition"),test_match:n.__name(function(a,r){var l,d,y;if(this.options.backtrack_lexer&&(y={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&&(y.yylloc.range=this.yylloc.range.slice(0))),d=a[0].match(/(?:\r\n?|\n).*/g),d&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],l=this.performAction.call(this,this.yy,this,r,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var c in y)this[c]=y[c];return!1}return!1},"test_match"),next:n.__name(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,r,l,d;this._more||(this.yytext="",this.match="");for(var y=this._currentRules(),c=0;c<y.length;c++)if(l=this._input.match(this.rules[y[c]]),l&&(!r||l[0].length>r[0].length)){if(r=l,d=c,this.options.backtrack_lexer){if(a=this.test_match(l,y[c]),a!==!1)return a;if(this._backtrack){r=!1;continue}else return!1}else if(!this.options.flex)break}return r?(a=this.test_match(r,y[d]),a!==!1?a:!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:n.__name(function(){var r=this.next();return r||this.lex()},"lex"),begin:n.__name(function(r){this.conditionStack.push(r)},"begin"),popState:n.__name(function(){var r=this.conditionStack.length-1;return r>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:n.__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:n.__name(function(r){return r=this.conditionStack.length-1-Math.abs(r||0),r>=0?this.conditionStack[r]:"INITIAL"},"topState"),pushState:n.__name(function(r){this.begin(r)},"pushState"),stateStackSize:n.__name(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:n.__name(function(r,l,d,y){switch(d){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 18;case 16:return 19;case 17:return":";case 18:return 6;case 19:return"INVALID"}},"anonymous"),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}};return h}();_.lexer=g;function m(){this.yy={}}return n.__name(m,"Parser"),m.prototype=_,_.Parser=m,new m}();U.parser=U;var pt=U,R="",D=[],V=[],L=[],_t=n.__name(function(){D.length=0,V.length=0,R="",L.length=0,n.clear()},"clear"),gt=n.__name(function(t){R=t,D.push(t)},"addSection"),mt=n.__name(function(){return D},"getSections"),xt=n.__name(function(){let t=nt();const e=100;let s=0;for(;!t&&s<e;)t=nt(),s++;return V.push(...L),V},"getTasks"),kt=n.__name(function(){const t=[];return V.forEach(s=>{s.people&&t.push(...s.people)}),[...new Set(t)].sort()},"updateActors"),vt=n.__name(function(t,e){const s=e.substr(1).split(":");let f=0,i=[];s.length===1?(f=Number(s[0]),i=[]):(f=Number(s[0]),i=s[1].split(","));const u=i.map(o=>o.trim()),p={section:R,type:R,people:u,task:t,score:f};L.push(p)},"addTask"),bt=n.__name(function(t){const e={section:R,type:R,description:t,task:t,classes:[]};V.push(e)},"addTaskOrg"),nt=n.__name(function(){const t=n.__name(function(s){return L[s].processed},"compileTask");let e=!0;for(const[s,f]of L.entries())t(s),e=e&&f.processed;return e},"compileTasks"),wt=n.__name(function(){return kt()},"getActors"),it={getConfig:n.__name(()=>n.getConfig2().journey,"getConfig"),clear:_t,setDiagramTitle:n.setDiagramTitle,getDiagramTitle:n.getDiagramTitle,setAccTitle:n.setAccTitle,getAccTitle:n.getAccTitle,setAccDescription:n.setAccDescription,getAccDescription:n.getAccDescription,addSection:gt,getSections:mt,getTasks:xt,addTask:vt,addTaskOrg:bt,getActors:wt},$t=n.__name(t=>`.label {
7
+ font-family: ${t.fontFamily};
8
+ color: ${t.textColor};
9
+ }
10
+ .mouth {
11
+ stroke: #666;
12
+ }
13
+
14
+ line {
15
+ stroke: ${t.textColor}
16
+ }
17
+
18
+ .legend {
19
+ fill: ${t.textColor};
20
+ font-family: ${t.fontFamily};
21
+ }
22
+
23
+ .label text {
24
+ fill: #333;
25
+ }
26
+ .label {
27
+ color: ${t.textColor}
28
+ }
29
+
30
+ .face {
31
+ ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
32
+ stroke: #999;
33
+ }
34
+
35
+ .node rect,
36
+ .node circle,
37
+ .node ellipse,
38
+ .node polygon,
39
+ .node path {
40
+ fill: ${t.mainBkg};
41
+ stroke: ${t.nodeBorder};
42
+ stroke-width: 1px;
43
+ }
44
+
45
+ .node .label {
46
+ text-align: center;
47
+ }
48
+ .node.clickable {
49
+ cursor: pointer;
50
+ }
51
+
52
+ .arrowheadPath {
53
+ fill: ${t.arrowheadColor};
54
+ }
55
+
56
+ .edgePath .path {
57
+ stroke: ${t.lineColor};
58
+ stroke-width: 1.5px;
59
+ }
60
+
61
+ .flowchart-link {
62
+ stroke: ${t.lineColor};
63
+ fill: none;
64
+ }
65
+
66
+ .edgeLabel {
67
+ background-color: ${t.edgeLabelBackground};
68
+ rect {
69
+ opacity: 0.5;
70
+ }
71
+ text-align: center;
72
+ }
73
+
74
+ .cluster rect {
75
+ }
76
+
77
+ .cluster text {
78
+ fill: ${t.titleColor};
79
+ }
80
+
81
+ div.mermaidTooltip {
82
+ position: absolute;
83
+ text-align: center;
84
+ max-width: 200px;
85
+ padding: 2px;
86
+ font-family: ${t.fontFamily};
87
+ font-size: 12px;
88
+ background: ${t.tertiaryColor};
89
+ border: 1px solid ${t.border2};
90
+ border-radius: 2px;
91
+ pointer-events: none;
92
+ z-index: 100;
93
+ }
94
+
95
+ .task-type-0, .section-type-0 {
96
+ ${t.fillType0?`fill: ${t.fillType0}`:""};
97
+ }
98
+ .task-type-1, .section-type-1 {
99
+ ${t.fillType0?`fill: ${t.fillType1}`:""};
100
+ }
101
+ .task-type-2, .section-type-2 {
102
+ ${t.fillType0?`fill: ${t.fillType2}`:""};
103
+ }
104
+ .task-type-3, .section-type-3 {
105
+ ${t.fillType0?`fill: ${t.fillType3}`:""};
106
+ }
107
+ .task-type-4, .section-type-4 {
108
+ ${t.fillType0?`fill: ${t.fillType4}`:""};
109
+ }
110
+ .task-type-5, .section-type-5 {
111
+ ${t.fillType0?`fill: ${t.fillType5}`:""};
112
+ }
113
+ .task-type-6, .section-type-6 {
114
+ ${t.fillType0?`fill: ${t.fillType6}`:""};
115
+ }
116
+ .task-type-7, .section-type-7 {
117
+ ${t.fillType0?`fill: ${t.fillType7}`:""};
118
+ }
119
+
120
+ .actor-0 {
121
+ ${t.actor0?`fill: ${t.actor0}`:""};
122
+ }
123
+ .actor-1 {
124
+ ${t.actor1?`fill: ${t.actor1}`:""};
125
+ }
126
+ .actor-2 {
127
+ ${t.actor2?`fill: ${t.actor2}`:""};
128
+ }
129
+ .actor-3 {
130
+ ${t.actor3?`fill: ${t.actor3}`:""};
131
+ }
132
+ .actor-4 {
133
+ ${t.actor4?`fill: ${t.actor4}`:""};
134
+ }
135
+ .actor-5 {
136
+ ${t.actor5?`fill: ${t.actor5}`:""};
137
+ }
138
+ ${ft.getIconStyles()}
139
+ `,"getStyles"),Tt=$t,Z=n.__name(function(t,e){return j.drawRect(t,e)},"drawRect"),St=n.__name(function(t,e){const f=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function u(_){const g=et.d3arc().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);_.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}n.__name(u,"smile");function p(_){const g=et.d3arc().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);_.append("path").attr("class","mouth").attr("d",g).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}n.__name(p,"sad");function o(_){_.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return n.__name(o,"ambivalent"),e.score>3?u(i):e.score<3?p(i):o(i),f},"drawFace"),st=n.__name(function(t,e){const s=t.append("circle");return s.attr("cx",e.cx),s.attr("cy",e.cy),s.attr("class","actor-"+e.pos),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("r",e.r),s.class!==void 0&&s.attr("class",s.class),e.title!==void 0&&s.append("title").text(e.title),s},"drawCircle"),lt=n.__name(function(t,e){return j.drawText(t,e)},"drawText"),Mt=n.__name(function(t,e){function s(i,u,p,o,_){return i+","+u+" "+(i+p)+","+u+" "+(i+p)+","+(u+o-_)+" "+(i+p-_*1.2)+","+(u+o)+" "+i+","+(u+o)}n.__name(s,"genPoints");const f=t.append("polygon");f.attr("points",s(e.x,e.y,50,20,7)),f.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,lt(t,e)},"drawLabel"),Ct=n.__name(function(t,e,s){const f=t.append("g"),i=j.getNoteRect();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=s.width*e.taskCount+s.diagramMarginX*(e.taskCount-1),i.height=s.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,Z(f,i),ot(s)(e.text,f,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},s,e.colour)},"drawSection"),X=-1,Et=n.__name(function(t,e,s,f){const i=e.x+s.width/2,u=t.append("g");X++;const p=300+5*30;u.append("line").attr("id",f+"-task"+X).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",p).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),St(u,{cx:i,cy:300+(5-e.score)*30,score:e.score});const o=j.getNoteRect();o.x=e.x,o.y=e.y,o.fill=e.fill,o.width=s.width,o.height=s.height,o.class="task task-type-"+e.num,o.rx=3,o.ry=3,Z(u,o);let _=e.x+14;e.people.forEach(g=>{const m=e.actors[g].color,h={cx:_,cy:e.y,r:7,fill:m,stroke:"#000",title:g,pos:e.actors[g].position};st(u,h),_+=10}),ot(s)(e.task,u,o.x,o.y,o.width,o.height,{class:"task"},s,e.colour)},"drawTask"),Pt=n.__name(function(t,e){j.drawBackgroundRect(t,e)},"drawBackgroundRect"),ot=function(){function t(i,u,p,o,_,g,m,h){const a=u.append("text").attr("x",p+_/2).attr("y",o+g/2+5).style("font-color",h).style("text-anchor","middle").text(i);f(a,m)}n.__name(t,"byText");function e(i,u,p,o,_,g,m,h,a){const{taskFontSize:r,taskFontFamily:l}=h,d=i.split(/<br\s*\/?>/gi);for(let y=0;y<d.length;y++){const c=y*r-r*(d.length-1)/2,v=u.append("text").attr("x",p+_/2).attr("y",o).attr("fill",a).style("text-anchor","middle").style("font-size",r).style("font-family",l);v.append("tspan").attr("x",p+_/2).attr("dy",c).text(d[y]),v.attr("y",o+g/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),f(v,m)}}n.__name(e,"byTspan");function s(i,u,p,o,_,g,m,h){const a=u.append("switch"),l=a.append("foreignObject").attr("x",p).attr("y",o).attr("width",_).attr("height",g).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,a,p,o,_,g,m,h),f(l,m)}n.__name(s,"byFo");function f(i,u){for(const p in u)p in u&&i.attr(p,u[p])}return n.__name(f,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?s:i.textPlacement==="old"?t:e}}(),At=n.__name(function(t,e){X=-1,t.append("defs").append("marker").attr("id",e+"-arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),B={drawRect:Z,drawCircle:st,drawSection:Ct,drawText:lt,drawLabel:Mt,drawTask:Et,drawBackgroundRect:Pt,initGraphics:At},It=n.__name(function(t){Object.keys(t).forEach(function(s){S[s]=t[s]})},"setConf"),C={},W=0;function ct(t){const e=n.getConfig2().journey,s=e.maxLabelWidth;W=0;let f=60;Object.keys(C).forEach(i=>{const u=C[i].color,p={cx:20,cy:f,r:7,fill:u,stroke:"#000",pos:C[i].position};B.drawCircle(t,p);let o=t.append("text").attr("visibility","hidden").text(i);const _=o.node().getBoundingClientRect().width;o.remove();let g=[];if(_<=s)g=[i];else{const m=i.split(" ");let h="";o=t.append("text").attr("visibility","hidden"),m.forEach(a=>{const r=h?`${h} ${a}`:a;if(o.text(r),o.node().getBoundingClientRect().width>s){if(h&&g.push(h),h=a,o.text(a),o.node().getBoundingClientRect().width>s){let d="";for(const y of a)d+=y,o.text(d+"-"),o.node().getBoundingClientRect().width>s&&(g.push(d.slice(0,-1)+"-"),d=y);h=d}}else h=r}),h&&g.push(h),o.remove()}g.forEach((m,h)=>{const a={x:40,y:f+7+h*20,fill:"#666",text:m,textMargin:e.boxTextMargin??5},l=B.drawText(t,a).node().getBoundingClientRect().width;l>W&&l>e.leftMargin-l&&(W=l)}),f+=Math.max(20,g.length*20)})}n.__name(ct,"drawActorLegend");var S=n.getConfig2().journey,P=0,Ft=n.__name(function(t,e,s,f){const i=n.getConfig2(),u=i.journey.titleColor,p=i.journey.titleFontSize,o=i.journey.titleFontFamily,_=i.securityLevel;let g;_==="sandbox"&&(g=n.select("#i"+e));const m=_==="sandbox"?n.select(g.nodes()[0].contentDocument.body):n.select("body");T.init();const h=m.select("#"+e);B.initGraphics(h,e);const a=f.db.getTasks(),r=f.db.getDiagramTitle(),l=f.db.getActors();for(const E in C)delete C[E];let d=0;l.forEach(E=>{C[E]={color:S.actorColours[d%S.actorColours.length],position:d},d++}),ct(h),P=S.leftMargin+W,T.insert(0,0,P,Object.keys(C).length*50),Rt(h,a,0,e);const y=T.getBounds();r&&h.append("text").text(r).attr("x",P).attr("font-size",p).attr("font-weight","bold").attr("y",25).attr("fill",u).attr("font-family",o);const c=y.stopy-y.starty+2*S.diagramMarginY,v=P+y.stopx+2*S.diagramMarginX;n.configureSvgSize(h,c,v,S.useMaxWidth),h.append("line").attr("x1",P).attr("y1",S.height*4).attr("x2",v-P-4).attr("y2",S.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#"+e+"-arrowhead)");const x=r?70:0;h.attr("viewBox",`${y.startx} -25 ${v} ${c+x}`),h.attr("preserveAspectRatio","xMinYMin meet"),h.attr("height",c+x+25)},"draw"),T={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:n.__name(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:n.__name(function(t,e,s,f){t[e]===void 0?t[e]=s:t[e]=f(s,t[e])},"updateVal"),updateBounds:n.__name(function(t,e,s,f){const i=n.getConfig2().journey,u=this;let p=0;function o(_){return n.__name(function(m){p++;const h=u.sequenceItems.length-p+1;u.updateVal(m,"starty",e-h*i.boxMargin,Math.min),u.updateVal(m,"stopy",f+h*i.boxMargin,Math.max),u.updateVal(T.data,"startx",t-h*i.boxMargin,Math.min),u.updateVal(T.data,"stopx",s+h*i.boxMargin,Math.max),_!=="activation"&&(u.updateVal(m,"startx",t-h*i.boxMargin,Math.min),u.updateVal(m,"stopx",s+h*i.boxMargin,Math.max),u.updateVal(T.data,"starty",e-h*i.boxMargin,Math.min),u.updateVal(T.data,"stopy",f+h*i.boxMargin,Math.max))},"updateItemBounds")}n.__name(o,"updateFn"),this.sequenceItems.forEach(o())},"updateBounds"),insert:n.__name(function(t,e,s,f){const i=Math.min(t,s),u=Math.max(t,s),p=Math.min(e,f),o=Math.max(e,f);this.updateVal(T.data,"startx",i,Math.min),this.updateVal(T.data,"starty",p,Math.min),this.updateVal(T.data,"stopx",u,Math.max),this.updateVal(T.data,"stopy",o,Math.max),this.updateBounds(i,p,u,o)},"insert"),bumpVerticalPos:n.__name(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:n.__name(function(){return this.verticalPos},"getVerticalPos"),getBounds:n.__name(function(){return this.data},"getBounds")},H=S.sectionFills,at=S.sectionColours,Rt=n.__name(function(t,e,s,f){const i=n.getConfig2().journey;let u="";const p=i.height*2+i.diagramMarginY,o=s+p;let _=0,g="#CCC",m="black",h=0;for(const[a,r]of e.entries()){if(u!==r.section){g=H[_%H.length],h=_%H.length,m=at[_%at.length];let d=0;const y=r.section;for(let v=a;v<e.length&&e[v].section==y;v++)d=d+1;const c={x:a*i.taskMargin+a*i.width+P,y:50,text:r.section,fill:g,num:h,colour:m,taskCount:d};B.drawSection(t,c,i),u=r.section,_++}const l=r.people.reduce((d,y)=>(C[y]&&(d[y]=C[y]),d),{});r.x=a*i.taskMargin+a*i.width+P,r.y=o,r.width=i.diagramMarginX,r.height=i.diagramMarginY,r.colour=m,r.fill=g,r.num=h,r.actors=l,B.drawTask(t,r,i,f),T.insert(r.x,r.y,r.x+r.width+i.taskMargin,300+5*30)}},"drawTasks"),rt={setConf:It,draw:Ft},Vt={parser:pt,db:it,renderer:rt,styles:Tt,init:n.__name(t=>{rt.setConf(t.journey),it.clear()},"init")};exports.diagram=Vt;