@maggioli-rd/aicore-agent-chat 1.1.1 → 1.3.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 (131) hide show
  1. package/README.md +33 -14
  2. package/dist/aicore-agent-chat.js +59 -38
  3. package/dist/aicore-agent-chat.js.map +1 -1
  4. package/dist/bundle/a2ui-C3GhjTrJ.js +113 -0
  5. package/dist/bundle/abnfDiagram-S7VZAUFO-DxkzIS8G.js +1 -0
  6. package/dist/bundle/architecture-WOLXFQ4H-BXMyXdT1.js +1 -0
  7. package/dist/bundle/architectureDiagram-YGSQEFNW-BmsDn6Ho.js +36 -0
  8. package/dist/bundle/blockDiagram-APKKGZFW-bG_MVPzT.js +140 -0
  9. package/dist/bundle/bpmnIcons-APHXDYXF-C0jbCElo.js +1 -0
  10. package/dist/bundle/c4Diagram-KJ2TOQU5-BVad-wQe.js +38 -0
  11. package/dist/bundle/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
  12. package/dist/bundle/chunk-5VM5RSS4-CwNG0iBi.js +15 -0
  13. package/dist/bundle/chunk-6MUBBAK2-CeH4cZO-.js +2 -0
  14. package/dist/bundle/chunk-AXFCVDMN-D0Vqm50X.js +62 -0
  15. package/dist/bundle/chunk-BG4553SI-DUBI9JbR.js +127 -0
  16. package/dist/bundle/chunk-DQASFODM-DBWVlIjs.js +10 -0
  17. package/dist/bundle/chunk-DUW6YSOI-ChybIQ82.js +1 -0
  18. package/dist/bundle/chunk-HFQBQIA3-D2xPptW8.js +1 -0
  19. package/dist/bundle/chunk-J5ZVWO5B-DHB__t6z.js +1 -0
  20. package/dist/bundle/chunk-JWPE2WC7-DVXcaiue.js +1 -0
  21. package/dist/bundle/chunk-KQLB2F66-BRGnyo9e.js +1 -0
  22. package/dist/bundle/chunk-KS47KZWR-DV3Gxewa.js +1 -0
  23. package/dist/bundle/chunk-LEVMRMFU-BdDTT4pw.js +1 -0
  24. package/dist/bundle/chunk-M57EVK23-BRqFqW5o.js +1 -0
  25. package/dist/bundle/chunk-NGNAAXSQ-DreF1ykJ.js +214 -0
  26. package/dist/bundle/chunk-OY52VR5R-BamrP8d_.js +88 -0
  27. package/dist/bundle/chunk-QB3YPZ4I-BqUUL29j.js +213 -0
  28. package/dist/bundle/chunk-R3KSYZAL-gmtEjdKU.js +1 -0
  29. package/dist/bundle/chunk-STOXU5M4-DdqxXfKq.js +72 -0
  30. package/dist/bundle/chunk-TU62E6Q5-B4GgWjUW.js +1 -0
  31. package/dist/bundle/chunk-X4PVCEUW-BcN5Aq5G.js +1 -0
  32. package/dist/bundle/chunk-XXDRQBXY-BIvjAdC_.js +1 -0
  33. package/dist/bundle/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
  34. package/dist/bundle/classDiagram-v2-L25IHNXF-Dw7so3mk.js +217 -0
  35. package/dist/bundle/cose-bilkent-JH36ORCC-DUvnuVrm.js +1 -0
  36. package/dist/bundle/cynefin-EF2NZ3EQ-CcVPiRLN.js +1 -0
  37. package/dist/bundle/cynefinDiagram-L36ESFBY-eO6Z3Kvn.js +62 -0
  38. package/dist/bundle/cytoscape.esm-CsT4DLSP.js +321 -0
  39. package/dist/bundle/d3-hierarchy-i5r04UUG.js +1 -0
  40. package/dist/bundle/d3-scale-BEO6F4Sh.js +1 -0
  41. package/dist/bundle/d3-scale-chromatic-DhHjp77O.js +1 -0
  42. package/dist/bundle/d3-selection-CBFxn8wf.js +1 -0
  43. package/dist/bundle/d3-shape-v1Y4qR5e.js +1 -0
  44. package/dist/bundle/dagre-SPEB5RXH-ByBZqBaT.js +4 -0
  45. package/dist/bundle/diagram-3B7GL73J-BkQkIpxz.js +200 -0
  46. package/dist/bundle/diagram-DNEMPZML-DYthXzRv.js +24 -0
  47. package/dist/bundle/diagram-L3MUGCDN-D4DIzfHH.js +41 -0
  48. package/dist/bundle/diagram-LA4NIPWU-C2P-hZD1.js +24 -0
  49. package/dist/bundle/diagram-MHCOC4E2-BwauFnTV.js +3 -0
  50. package/dist/bundle/diagram-XPFHEONP-DC_v3Llc.js +30 -0
  51. package/dist/bundle/dist-CwuaKeLF.js +1 -0
  52. package/dist/bundle/ebnfDiagram-UZSYDL2S-CmwGlC8L.js +1 -0
  53. package/dist/bundle/elk-XV6XMXQE-CTlty3p3.js +27 -0
  54. package/dist/bundle/erDiagram-EYBAPDEH-Bu6phvJH.js +99 -0
  55. package/dist/bundle/eventmodeling-K75KTNOO-B1q0nOJE.js +1 -0
  56. package/dist/bundle/flowDiagram-MALGAFMO-D9D_AzXh.js +1 -0
  57. package/dist/bundle/ganttDiagram-23REXITY-COK7rxO4.js +292 -0
  58. package/dist/bundle/gitGraph-VSP46ZUC-DS7S_jKI.js +1 -0
  59. package/dist/bundle/gitGraphDiagram-STJD7YCW-DhVK8Hqh.js +106 -0
  60. package/dist/bundle/graphlib-Bgy7WbC7.js +1 -0
  61. package/dist/bundle/info-OHQRW6UA-BjEWvFlW.js +1 -0
  62. package/dist/bundle/infoDiagram-KBXO4MBG-Dg3zWdHP.js +2 -0
  63. package/dist/bundle/ishikawaDiagram-M35NCXHK-C2g8ghrV.js +70 -0
  64. package/dist/bundle/journeyDiagram-OPLOXDXO-DMZkL-i1.js +139 -0
  65. package/dist/bundle/kanban-definition-BZKZHSQY-Dr43IiJD.js +89 -0
  66. package/dist/bundle/katex-rAoShGnF.js +257 -0
  67. package/dist/bundle/math-Cx-Q-b8s.js +262 -0
  68. package/dist/bundle/mermaid-DaDuEHir.js +43 -0
  69. package/dist/bundle/mermaid-parser.core-Bv_Zx_ZE.js +6 -0
  70. package/dist/bundle/mindmap-definition-I2QAS2VK-BXCWJ_1R.js +98 -0
  71. package/dist/bundle/packet-JDAUHWVQ-CgB2qE5t.js +1 -0
  72. package/dist/bundle/pegDiagram-FD4XPPHP-CR58gOgF.js +1 -0
  73. package/dist/bundle/pie-XZMESJXO-CvXWTfIG.js +1 -0
  74. package/dist/bundle/pieDiagram-J4AKIIQI-D0GhbNJg.js +39 -0
  75. package/dist/bundle/quadrantDiagram-XTYBLID2-BKBEdwvC.js +7 -0
  76. package/dist/bundle/radar-ABXABTNO-8V_xx_AB.js +1 -0
  77. package/dist/bundle/railroad-I3PHUGI6-Bvb0GUva.js +1 -0
  78. package/dist/bundle/railroad-abnf-LNEFI6M7-D8xGcObq.js +1 -0
  79. package/dist/bundle/railroad-ebnf-DWYD2UWJ-Ch8wBawI.js +1 -0
  80. package/dist/bundle/railroad-peg-JR7BVNR7-CGndbjed.js +1 -0
  81. package/dist/bundle/railroadDiagram-MRQ6NCDL-DvqHkO2C.js +1 -0
  82. package/dist/bundle/requirementDiagram-Y7LWUY3S-bCLAM9sl.js +84 -0
  83. package/dist/bundle/rolldown-runtime-BNaE-Ejt.js +1 -0
  84. package/dist/bundle/rough.esm-Dy-Kn_BL.js +1 -0
  85. package/dist/bundle/sankeyDiagram-WGJFYUXA-8ehuPvHQ.js +40 -0
  86. package/dist/bundle/sequenceDiagram-5NDRBG5M-Cdg1YzMw.js +169 -0
  87. package/dist/bundle/sizeCapture-INFHLROL-Ct7XApxm.js +1 -0
  88. package/dist/bundle/stateDiagram-v2-FJ4FJNEA-B69v2YYC.js +291 -0
  89. package/dist/bundle/swimlanes-UMQ2AFYF-C_qI6rnK.js +1 -0
  90. package/dist/bundle/swimlanesDiagram-OMPLPG4O-CS11qSCX.js +8 -0
  91. package/dist/bundle/timeline-definition-SEUHKTQE-BCU0-H8D.js +120 -0
  92. package/dist/bundle/treeView-D4JQ5SDB-CpjURS-c.js +1 -0
  93. package/dist/bundle/treemap-SAJKECNS-CFFTaiIN.js +1 -0
  94. package/dist/bundle/usecaseDiagram-AFA6YXN4-46V1jsea.js +476 -0
  95. package/dist/bundle/vega-eBn1AexV.js +33 -0
  96. package/dist/bundle/vennDiagram-NNMJR3RB-q4Q4x2Q6.js +34 -0
  97. package/dist/bundle/wardley-7MLQ67FV-DhnATL7b.js +1 -0
  98. package/dist/bundle/wardleyDiagram-S7YFUSEH-BHIufnZW.js +78 -0
  99. package/dist/bundle/xychartDiagram-GGNKY7IX-CxAjpN3O.js +7 -0
  100. package/dist/chunks/a2ui-BLaPxJ9N.js +961 -0
  101. package/dist/chunks/a2ui-BLaPxJ9N.js.map +1 -0
  102. package/dist/chunks/math-D5IXRTov.js +86 -0
  103. package/dist/chunks/math-D5IXRTov.js.map +1 -0
  104. package/dist/chunks/mermaid-j9RNkOnL.js +197 -0
  105. package/dist/chunks/mermaid-j9RNkOnL.js.map +1 -0
  106. package/dist/chunks/rich-C2iN_5zh.js +156 -0
  107. package/dist/chunks/rich-C2iN_5zh.js.map +1 -0
  108. package/dist/chunks/sanitize-COLQzplk.js +240 -0
  109. package/dist/chunks/sanitize-COLQzplk.js.map +1 -0
  110. package/dist/chunks/{src-DPfU5Bd2.js → src-Blgo9nVC.js} +387 -73
  111. package/dist/chunks/src-Blgo9nVC.js.map +1 -0
  112. package/dist/chunks/vega-BkX1Fjq6.js +301 -0
  113. package/dist/chunks/vega-BkX1Fjq6.js.map +1 -0
  114. package/dist/define.js +1 -1
  115. package/dist/index.js +1 -1
  116. package/dist/types/element/i18n.d.ts +21 -2
  117. package/dist/types/element/index.d.ts +11 -2
  118. package/dist/types/element/markdown.d.ts +6 -3
  119. package/dist/types/element/rich/a2ui-format.d.ts +45 -0
  120. package/dist/types/element/rich/a2ui-icons.d.ts +1 -0
  121. package/dist/types/element/rich/a2ui-views.d.ts +37 -0
  122. package/dist/types/element/rich/a2ui.d.ts +2 -0
  123. package/dist/types/element/rich/index.d.ts +66 -0
  124. package/dist/types/element/rich/math.d.ts +4 -0
  125. package/dist/types/element/rich/mermaid.d.ts +2 -0
  126. package/dist/types/element/rich/vega.d.ts +2 -0
  127. package/dist/types/element/sanitize.d.ts +34 -0
  128. package/dist/types/element/styles.d.ts +1 -1
  129. package/dist/types/jsx.d.ts +2 -0
  130. package/package.json +12 -6
  131. package/dist/chunks/src-DPfU5Bd2.js.map +0 -1
@@ -0,0 +1,89 @@
1
+ import{t as e}from"./chunk-5VM5RSS4-CwNG0iBi.js";import{n as t,o as n,r}from"./mermaid-DaDuEHir.js";import{r as i}from"./chunk-M57EVK23-BRqFqW5o.js";import{i as a,r as o}from"./chunk-LEVMRMFU-BdDTT4pw.js";import"./chunk-AXFCVDMN-D0Vqm50X.js";import"./chunk-X4PVCEUW-BcN5Aq5G.js";import"./chunk-STOXU5M4-DdqxXfKq.js";import"./chunk-R3KSYZAL-gmtEjdKU.js";import"./chunk-6MUBBAK2-CeH4cZO-.js";import{Y as s,b as c,et as l,f as u,rt as d,tt as f,z as p}from"./chunk-BG4553SI-DUBI9JbR.js";import{n as m}from"./d3-selection-CBFxn8wf.js";import{n as h}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";var g=(function(){var e=/* @__PURE__ */ h(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,4],n=[1,13],r=[1,12],i=[1,15],a=[1,16],o=[1,20],s=[1,19],c=[6,7,8],l=[1,26],u=[1,24],d=[1,25],f=[6,7,11],p=[1,31],m=[6,7,11,24],g=[1,6,13,16,17,20,23],_=[1,35],v=[1,36],y=[1,6,7,11,13,16,17,20,23],b=[1,38],x={trace:/* @__PURE__ */ h(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:/* @__PURE__ */ h(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:r,14:14,16:i,17:a,18:17,19:18,20:o,23:s},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:n,12:21,13:r,14:14,16:i,17:a,18:17,19:18,20:o,23:s},{6:n,9:22,12:11,13:r,14:14,16:i,17:a,18:17,19:18,20:o,23:s},{6:l,7:u,10:23,11:d},e(f,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:s}),e(f,[2,19]),e(f,[2,21],{15:30,24:p}),e(f,[2,22]),e(f,[2,23]),e(m,[2,25]),e(m,[2,26]),e(m,[2,28],{20:[1,32]}),{21:[1,33]},{6:l,7:u,10:34,11:d},{1:[2,7],6:n,12:21,13:r,14:14,16:i,17:a,18:17,19:18,20:o,23:s},e(g,[2,14],{7:_,11:v}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(f,[2,16],{15:37,24:p}),e(f,[2,17]),e(f,[2,18]),e(f,[2,20],{24:b}),e(m,[2,31]),{21:[1,39]},{22:[1,40]},e(g,[2,13],{7:_,11:v}),e(y,[2,11]),e(y,[2,12]),e(f,[2,15],{24:b}),e(m,[2,30]),{22:[1,41]},e(m,[2,27]),e(m,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:/* @__PURE__ */ h(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:/* @__PURE__ */ h(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,c=0,l=0,u=0,d=2,f=1,p=a.slice.call(arguments,1),m=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);m.setInput(e,g.yy),g.yy.lexer=m,g.yy.parser=this,m.yylloc===void 0&&(m.yylloc={});var v=m.yylloc;a.push(v);var y=m.options&&m.options.ranges;this.parseError=typeof g.yy.parseError==`function`?g.yy.parseError:Object.getPrototypeOf(this).parseError;function b(e){n.length-=2*e,i.length-=e,a.length-=e}h(b,`popStack`);function x(){var e=r.pop()||m.lex()||f;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}h(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=n[n.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=o[w]&&o[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],o[w])this.terminals_[O]&&O>d&&j.push(`'`+this.terminals_[O]+`'`);M=m.showPosition?`Parse error on line `+(c+1)+`:
2
+ `+m.showPosition()+`
3
+ Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(c+1)+`: Unexpected `+(S==f?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:m.match,token:this.terminals_[S]||S,line:m.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:n.push(S),i.push(m.yytext),a.push(m.yylloc),n.push(T[1]),S=null,C?(S=C,C=null):(l=m.yyleng,s=m.yytext,c=m.yylineno,v=m.yylloc,u>0&&u--);break;case 2:if(k=this.productions_[T[1]][1],D.$=i[i.length-k],D._$={first_line:a[a.length-(k||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(k||1)].first_column,last_column:a[a.length-1].last_column},y&&(D._$.range=[a[a.length-(k||1)].range[0],a[a.length-1].range[1]]),E=this.performAction.apply(D,[s,l,c,g.yy,T[1],i,a].concat(p)),E!==void 0)return E;k&&(n=n.slice(0,-1*k*2),i=i.slice(0,-1*k),a=a.slice(0,-1*k)),n.push(this.productions_[T[1]][0]),i.push(D.$),a.push(D._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0},`parse`)};x.lexer=/* @__PURE__ */ (function(){return{EOF:1,parseError:/* @__PURE__ */ h(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:/* @__PURE__ */ h(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:/* @__PURE__ */ h(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:/* @__PURE__ */ h(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:/* @__PURE__ */ h(function(){return this._more=!0,this},`more`),reject:/* @__PURE__ */ h(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:/* @__PURE__ */ h(function(e){this.unput(this.match.slice(e))},`less`),pastInput:/* @__PURE__ */ h(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:/* @__PURE__ */ h(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:/* @__PURE__ */ h(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
5
+ `+t+`^`},`showPosition`),test_match:/* @__PURE__ */ h(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:/* @__PURE__ */ h(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):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:/* @__PURE__ */ h(function(){return this.next()||this.lex()},`lex`),begin:/* @__PURE__ */ h(function(e){this.conditionStack.push(e)},`begin`),popState:/* @__PURE__ */ h(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:/* @__PURE__ */ h(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:/* @__PURE__ */ h(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:/* @__PURE__ */ h(function(e){this.begin(e)},`pushState`),stateStackSize:/* @__PURE__ */ h(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:/* @__PURE__ */ h(function(e,t,n,r){switch(n){case 0:return this.pushState(`shapeData`),t.yytext=``,24;case 1:return this.pushState(`shapeDataStr`),24;case 2:return this.popState(),24;case 3:return t.yytext=t.yytext.replace(/\n\s*/g,`<br/>`),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace(`Found comment`,t.yytext),6;case 7:return 8;case 8:this.begin(`CLASS`);break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace(`Begin icon`),this.begin(`ICON`);break;case 12:return e.getLogger().trace(`SPACELINE`),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace(`end icon`),this.popState();break;case 16:return e.getLogger().trace(`Exploding node`),this.begin(`NODE`),20;case 17:return e.getLogger().trace(`Cloud`),this.begin(`NODE`),20;case 18:return e.getLogger().trace(`Explosion Bang`),this.begin(`NODE`),20;case 19:return e.getLogger().trace(`Cloud Bang`),this.begin(`NODE`),20;case 20:return this.begin(`NODE`),20;case 21:return this.begin(`NODE`),20;case 22:return this.begin(`NODE`),20;case 23:return this.begin(`NODE`),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin(`NSTR2`);break;case 28:return`NODE_DESCR`;case 29:this.popState();break;case 30:e.getLogger().trace(`Starting NSTR`),this.begin(`NSTR`);break;case 31:return e.getLogger().trace(`description:`,t.yytext),`NODE_DESCR`;case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace(`node end ))`),`NODE_DEND`;case 34:return this.popState(),e.getLogger().trace(`node end )`),`NODE_DEND`;case 35:return this.popState(),e.getLogger().trace(`node end ...`,t.yytext),`NODE_DEND`;case 36:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 37:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 41:return e.getLogger().trace(`Long description:`,t.yytext),21;case 42:return e.getLogger().trace(`Long description:`,t.yytext),21}},`anonymous`),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}})();function S(){this.yy={}}return h(S,`Parser`),S.prototype=x,x.Parser=S,new S})();g.parser=g;var _=g,v=[],y=[],b=0,x={},S=/* @__PURE__ */ h(()=>{v=[],y=[],b=0,x={}},`clear`),C=/* @__PURE__ */ h(e=>{if(v.length===0)return null;let t=v[0].level,n=null;for(let e=v.length-1;e>=0;e--)if(v[e].level===t&&!n&&(n=v[e]),v[e].level<t)throw Error(`Items without section detected, found section ("`+v[e].label+`")`);return e===n?.level?null:n},`getSection`),w=/* @__PURE__ */ h(function(){return y},`getSections`),T=/* @__PURE__ */ h(function(){let e=[],t=[],n=w(),r=c();for(let e of n){let n={id:e.id,label:p(e.label??``,r),labelType:`markdown`,isGroup:!0,ticket:e.ticket,shape:`kanbanSection`,level:e.level,look:r.look};t.push(n);let i=v.filter(t=>t.parentId===e.id);for(let n of i){let i={id:n.id,parentId:e.id,label:p(n.label??``,r),labelType:`markdown`,isGroup:!1,ticket:n?.ticket,priority:n?.priority,assigned:n?.assigned,icon:n?.icon,shape:`kanbanItem`,level:n.level,rx:5,ry:5,cssStyles:[`text-align: left`]};t.push(i)}}return{nodes:t,edges:e,other:{},config:c()}},`getData`),E=/* @__PURE__ */ h((e,n,i,a,o)=>{let s=c(),l=s.mindmap?.padding??u.mindmap.padding;switch(a){case D.ROUNDED_RECT:case D.RECT:case D.HEXAGON:l*=2}let d={id:p(n,s)||`kbn`+b++,level:e,label:p(i,s),width:s.mindmap?.maxNodeWidth??u.mindmap.maxNodeWidth,padding:l,isGroup:!1};if(o!==void 0){let e;e=o.includes(`
7
+ `)?o+`
8
+ `:`{
9
+ `+o+`
10
+ }`;let n=r(e,{schema:t});if(n.shape&&(n.shape!==n.shape.toLowerCase()||n.shape.includes(`_`)))throw Error(`No such shape: ${n.shape}. Shape names should be lowercase.`);n?.shape&&n.shape===`kanbanItem`&&(d.shape=n?.shape),n?.label&&(d.label=n?.label),n?.icon&&(d.icon=n?.icon.toString()),n?.assigned&&(d.assigned=n?.assigned.toString()),n?.ticket&&(d.ticket=n?.ticket.toString()),n?.priority&&(d.priority=n?.priority)}let f=C(e);f?d.parentId=f.id||`kbn`+b++:y.push(d),v.push(d)},`addNode`),D={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},O={clear:S,addNode:E,getSections:w,getData:T,nodeType:D,getType:/* @__PURE__ */ h((e,t)=>{switch(m.debug(`In get type`,e,t),e){case`[`:return D.RECT;case`(`:return t===`)`?D.ROUNDED_RECT:D.CLOUD;case`((`:return D.CIRCLE;case`)`:return D.CLOUD;case`))`:return D.BANG;case`{{`:return D.HEXAGON;default:return D.DEFAULT}},`getType`),setElementForId:/* @__PURE__ */ h((e,t)=>{x[e]=t},`setElementForId`),decorateNode:/* @__PURE__ */ h(e=>{if(!e)return;let t=c(),n=v[v.length-1];e.icon&&(n.icon=p(e.icon,t)),e.class&&(n.cssClasses=p(e.class,t))},`decorateNode`),type2Str:/* @__PURE__ */ h(e=>{switch(e){case D.DEFAULT:return`no-border`;case D.RECT:return`rect`;case D.ROUNDED_RECT:return`rounded-rect`;case D.CIRCLE:return`circle`;case D.CLOUD:return`cloud`;case D.BANG:return`bang`;case D.HEXAGON:return`hexgon`;default:return`no-border`}},`type2Str`),getLogger:/* @__PURE__ */ h(()=>m,`getLogger`),getElementById:/* @__PURE__ */ h(e=>x[e],`getElementById`)},k={draw:/* @__PURE__ */ h(async(e,t,r,l)=>{m.debug(`Rendering kanban diagram
11
+ `+e);let d=l.db.getData(),f=c();f.htmlLabels=!1;let p=n(t);for(let e of d.nodes)e.domId=`${t}-${e.id}`;let h=p.append(`g`);h.attr(`class`,`sections`);let g=p.append(`g`);g.attr(`class`,`items`);let _=d.nodes.filter(e=>e.isGroup),v=0,y=[],b=25;for(let e of _){let t=f?.kanban?.sectionWidth||200;v+=1,e.x=t*v+(v-1)*10/2,e.width=t,e.y=0,e.height=t*3,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+` section-`+v;let n=await i(h,e);b=Math.max(b,n?.labelBBox?.height),y.push(n)}let x=0;for(let e of _){let t=y[x];x+=1;let n=f?.kanban?.sectionWidth||200,r=-n*3/2+b,i=r,s=d.nodes.filter(t=>t.parentId===e.id);for(let t of s){if(t.isGroup)throw Error(`Groups within groups are not allowed in Kanban diagrams`);t.x=e.x,t.width=n-15;let r=(await o(g,t,{config:f})).node().getBBox();t.y=i+r.height/2,await a(t),i=t.y+r.height/2+5}let c=t.cluster.select(`rect`),l=Math.max(i-r+30,50)+(b-25);c.attr(`height`,l)}s(void 0,p,f.mindmap?.padding??u.kanban.padding,f.mindmap?.useMaxWidth??u.kanban.useMaxWidth)},`draw`)},A=/* @__PURE__ */ h(e=>{let t=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e[`lineColor`+t]=e[`lineColor`+t]||e[`cScaleInv`+t],d(e[`lineColor`+t])?e[`lineColor`+t]=f(e[`lineColor`+t],20):e[`lineColor`+t]=l(e[`lineColor`+t],20);let n=/* @__PURE__ */ h((t,n)=>e.darkMode?l(t,n):f(t,n),`adjuster`);for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=``+(17-3*r);t+=`
12
+ .section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} polygon, .section-${r-1} path {
13
+ fill: ${n(e[`cScale`+r],10)};
14
+ stroke: ${n(e[`cScale`+r],10)};
15
+
16
+ }
17
+ .section-${r-1} text {
18
+ fill: ${e[`cScaleLabel`+r]};
19
+ }
20
+ .node-icon-${r-1} {
21
+ font-size: 40px;
22
+ color: ${e[`cScaleLabel`+r]};
23
+ }
24
+ .section-edge-${r-1}{
25
+ stroke: ${e[`cScale`+r]};
26
+ }
27
+ .edge-depth-${r-1}{
28
+ stroke-width: ${i};
29
+ }
30
+ .section-${r-1} line {
31
+ stroke: ${e[`cScaleInv`+r]} ;
32
+ stroke-width: 3;
33
+ }
34
+
35
+ .disabled, .disabled circle, .disabled text {
36
+ fill: lightgray;
37
+ }
38
+ .disabled text {
39
+ fill: #efefef;
40
+ }
41
+
42
+ .node rect,
43
+ .node circle,
44
+ .node ellipse,
45
+ .node polygon,
46
+ .node path {
47
+ fill: ${e.background};
48
+ stroke: ${e.nodeBorder};
49
+ stroke-width: 1px;
50
+ }
51
+
52
+ .kanban-ticket-link {
53
+ fill: ${e.background};
54
+ stroke: ${e.nodeBorder};
55
+ text-decoration: underline;
56
+ }
57
+ `}return t},`genSections`),j={db:O,renderer:k,parser:_,styles:/* @__PURE__ */ h(t=>`
58
+ .edge {
59
+ stroke-width: 3;
60
+ }
61
+ ${A(t)}
62
+ .section-root rect, .section-root path, .section-root circle, .section-root polygon {
63
+ fill: ${t.git0};
64
+ }
65
+ .section-root text {
66
+ fill: ${t.gitBranchLabel0};
67
+ }
68
+ .icon-container {
69
+ height:100%;
70
+ display: flex;
71
+ justify-content: center;
72
+ align-items: center;
73
+ }
74
+ .edge {
75
+ fill: none;
76
+ }
77
+ .cluster-label, .label {
78
+ color: ${t.textColor};
79
+ fill: ${t.textColor};
80
+ }
81
+ .kanban-label {
82
+ dy: 1em;
83
+ alignment-baseline: middle;
84
+ text-anchor: middle;
85
+ dominant-baseline: middle;
86
+ text-align: center;
87
+ }
88
+ ${e()}
89
+ `,`getStyles`)};export{j as diagram};