@bigduu/lotus 2026.4.30 → 2026.5.4

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 (66) hide show
  1. package/dist/assets/App-CIBUzKFV.js +254 -0
  2. package/dist/assets/{App-B5iMQtsl.css → App-DJeBpzcc.css} +1 -1
  3. package/dist/assets/{_baseUniq-JxvxITJ4.js → _baseUniq-C-LHgpwK.js} +1 -1
  4. package/dist/assets/{architectureDiagram-Q4EWVU46-BtLEHHTC.js → architectureDiagram-Q4EWVU46-knT7SmxI.js} +1 -1
  5. package/dist/assets/{blockDiagram-DXYQGD6D-VCIl5oVL.js → blockDiagram-DXYQGD6D-B9y1uS9R.js} +1 -1
  6. package/dist/assets/{c4Diagram-AHTNJAMY-sxcrRtSC.js → c4Diagram-AHTNJAMY-BRoJcx0b.js} +1 -1
  7. package/dist/assets/{chunk-4BX2VUAB-cdpbCefI.js → chunk-4BX2VUAB-Dg65rhkh.js} +1 -1
  8. package/dist/assets/{chunk-4TB4RGXK-6y4jkX8O.js → chunk-4TB4RGXK-D95yqR9H.js} +1 -1
  9. package/dist/assets/{chunk-55IACEB6-zGTUbgou.js → chunk-55IACEB6-CUbVVgja.js} +1 -1
  10. package/dist/assets/{chunk-EDXVE4YY-CPKsbfnW.js → chunk-EDXVE4YY-B_pb0EHW.js} +1 -1
  11. package/dist/assets/{chunk-FMBD7UC4-u1fsHgLk.js → chunk-FMBD7UC4-B0r7CE0W.js} +1 -1
  12. package/dist/assets/{chunk-OYMX7WX6-B_juGEzU.js → chunk-OYMX7WX6-2_Im5UU8.js} +1 -1
  13. package/dist/assets/{chunk-QZHKN3VN-Cziuusiz.js → chunk-QZHKN3VN-DbGqS_ab.js} +1 -1
  14. package/dist/assets/{chunk-YZCP3GAM-SnPgbijx.js → chunk-YZCP3GAM-DdAJ9t55.js} +1 -1
  15. package/dist/assets/classDiagram-6PBFFD2Q-hQqJj1FL.js +1 -0
  16. package/dist/assets/classDiagram-v2-HSJHXN6E-hQqJj1FL.js +1 -0
  17. package/dist/assets/clone-BnNFRj9O.js +1 -0
  18. package/dist/assets/{cose-bilkent-S5V4N54A-DP12PpvR.js → cose-bilkent-S5V4N54A-BDxVvsWm.js} +1 -1
  19. package/dist/assets/{dagre-KV5264BT-BWrJEOJE.js → dagre-KV5264BT-vzGZtZ_w.js} +1 -1
  20. package/dist/assets/{diagram-5BDNPKRD-B3Ag_nwx.js → diagram-5BDNPKRD-CGYBSS7a.js} +1 -1
  21. package/dist/assets/{diagram-G4DWMVQ6-CU5AAMtk.js → diagram-G4DWMVQ6-DBeNrz6n.js} +1 -1
  22. package/dist/assets/{diagram-MMDJMWI5-0jeeksm5.js → diagram-MMDJMWI5-CCt9wdnx.js} +1 -1
  23. package/dist/assets/{diagram-TYMM5635-B8Te0NTK.js → diagram-TYMM5635-B-q2z4os.js} +1 -1
  24. package/dist/assets/{erDiagram-SMLLAGMA-DgZehpcF.js → erDiagram-SMLLAGMA-DFjajcpE.js} +1 -1
  25. package/dist/assets/{flowDiagram-DWJPFMVM-DME4sy3r.js → flowDiagram-DWJPFMVM-CmdYRxD2.js} +1 -1
  26. package/dist/assets/{ganttDiagram-T4ZO3ILL-4VUoDKDN.js → ganttDiagram-T4ZO3ILL-BdeV_JQv.js} +1 -1
  27. package/dist/assets/{gitGraphDiagram-UUTBAWPF-M9eA0knu.js → gitGraphDiagram-UUTBAWPF-Bv1bpmVh.js} +1 -1
  28. package/dist/assets/{graph-Dl52eM4Z.js → graph-BZhdALnM.js} +1 -1
  29. package/dist/assets/{index-v1C2DQLr.js → index-8MhLoQym.js} +1 -1
  30. package/dist/assets/{index-C9mV36Y0.js → index-BR-Jz13T.js} +1 -1
  31. package/dist/assets/{index-BNcuFl0J.js → index-Byt6VrzO.js} +1 -1
  32. package/dist/assets/{index-BAibvIVz.js → index-CTVpEC_u.js} +1 -1
  33. package/dist/assets/{index-yMJRRs89.js → index-jIgpBMFj.js} +1 -1
  34. package/dist/assets/{index.es-DYgOq-7b.js → index.es-Cn1_mau_.js} +1 -1
  35. package/dist/assets/{infoDiagram-42DDH7IO-DSE-8cVU.js → infoDiagram-42DDH7IO-COrckp6q.js} +1 -1
  36. package/dist/assets/{ishikawaDiagram-UXIWVN3A-CZdup7Ia.js → ishikawaDiagram-UXIWVN3A-mjLLHcYj.js} +1 -1
  37. package/dist/assets/{journeyDiagram-VCZTEJTY-DApltPSo.js → journeyDiagram-VCZTEJTY-DKAns2QR.js} +1 -1
  38. package/dist/assets/{kanban-definition-6JOO6SKY-ClF33MZ9.js → kanban-definition-6JOO6SKY-_8RYarrG.js} +1 -1
  39. package/dist/assets/{layout-Cc6oxhrd.js → layout-BJQnEdOR.js} +1 -1
  40. package/dist/assets/{main-BgGBpmTu.js → main-_fs1sZGu.js} +5 -5
  41. package/dist/assets/{min-CRXMcNks.js → min-CEPPgGqS.js} +1 -1
  42. package/dist/assets/{mindmap-definition-QFDTVHPH-Cp5dCq5F.js → mindmap-definition-QFDTVHPH-B8Fqmn2S.js} +1 -1
  43. package/dist/assets/{pieDiagram-DEJITSTG-xwiGZjCh.js → pieDiagram-DEJITSTG-BCklzk2d.js} +1 -1
  44. package/dist/assets/{quadrantDiagram-34T5L4WZ-DYFzLdJ_.js → quadrantDiagram-34T5L4WZ-ea-ItGVk.js} +1 -1
  45. package/dist/assets/{requirementDiagram-MS252O5E-CcTppyOC.js → requirementDiagram-MS252O5E-DoJ6ZjPU.js} +1 -1
  46. package/dist/assets/{sankeyDiagram-XADWPNL6-BidnGUTn.js → sankeyDiagram-XADWPNL6-CtYEK_8E.js} +1 -1
  47. package/dist/assets/{sequenceDiagram-FGHM5R23-BGNLJ-kB.js → sequenceDiagram-FGHM5R23-CnFMNFdv.js} +1 -1
  48. package/dist/assets/{stateDiagram-FHFEXIEX-DaT9haW6.js → stateDiagram-FHFEXIEX-B_kOGWb-.js} +1 -1
  49. package/dist/assets/stateDiagram-v2-QKLJ7IA2-DL6DUSmq.js +1 -0
  50. package/dist/assets/{timeline-definition-GMOUNBTQ-B7UYx32z.js → timeline-definition-GMOUNBTQ-Dgx0wfE4.js} +1 -1
  51. package/dist/assets/{vendor-antd-Dvkx9eba.js → vendor-antd-BpW-8RO2.js} +1 -1
  52. package/dist/assets/{vendor-charts-DHCOhRb3.js → vendor-charts-fIPNnfk-.js} +1 -1
  53. package/dist/assets/{vendor-markdown-DrUBuQ-c.js → vendor-markdown-yOmFo5hK.js} +1 -1
  54. package/dist/assets/{vendor-mermaid-BAz0MwVj.js → vendor-mermaid-DA4JIJaA.js} +4 -4
  55. package/dist/assets/{vendor-pdf-wx1tMujY.js → vendor-pdf-xt0MLWhy.js} +4 -4
  56. package/dist/assets/{vennDiagram-DHZGUBPP-DbgCCrwc.js → vennDiagram-DHZGUBPP-DcJGrLhu.js} +1 -1
  57. package/dist/assets/{wardley-RL74JXVD-BeMJefeY.js → wardley-RL74JXVD-DIGH9Gor.js} +1 -1
  58. package/dist/assets/{wardleyDiagram-NUSXRM2D-CfibirQl.js → wardleyDiagram-NUSXRM2D-CMAuUksM.js} +1 -1
  59. package/dist/assets/{xychartDiagram-5P7HB3ND-OkJekxIp.js → xychartDiagram-5P7HB3ND-B4_9m2II.js} +1 -1
  60. package/dist/index.html +3 -3
  61. package/package.json +3 -1
  62. package/dist/assets/App-DCXI8jTD.js +0 -248
  63. package/dist/assets/classDiagram-6PBFFD2Q-8WbR2T8d.js +0 -1
  64. package/dist/assets/classDiagram-v2-HSJHXN6E-8WbR2T8d.js +0 -1
  65. package/dist/assets/clone-BzHXtWgJ.js +0 -1
  66. package/dist/assets/stateDiagram-v2-QKLJ7IA2-CIjRWULt.js +0 -1
@@ -1,4 +1,4 @@
1
- import{_ as b,G as u,K as B,e as C,l as w,b as S,a as D,p as T,q as z,g as E,s as P,H as F,E as A,z as W}from"./vendor-mermaid-BAz0MwVj.js";import{p as _}from"./chunk-4BX2VUAB-cdpbCefI.js";import{p as N}from"./wardley-RL74JXVD-BeMJefeY.js";import"./vendor-markdown-DrUBuQ-c.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-Dvkx9eba.js";import"./vendor-charts-DHCOhRb3.js";import"./min-CRXMcNks.js";import"./_baseUniq-JxvxITJ4.js";var L=F.packet,m,v=(m=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=E,this.setAccDescription=P}getConfig(){const t=u({...L,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},b(m,"PacketDB"),m),M=1e4,Y=b((e,t)=>{_(e,t);let o=-1,r=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??(a=o+1),a!==o+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${o+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??(i=a+(d??1)-1),d??(d=i-a+1),o=i,w.debug(`Packet block ${a} - ${o} with label ${c}`);r.length<=l+1&&t.getPacket().length<M;){const[p,s]=G({start:a,end:i,bits:d,label:c},n,l);if(r.push(p),p.end+1===n*l&&(t.pushWord(r),r=[],n++),!s)break;({start:a,end:i,bits:d,label:c}=s)}}t.pushWord(r)},"populate"),G=b((e,t,o)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*o)return[e,void 0];const r=t*o-1,n=t*o;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{var r;const t=await N("packet",e),o=(r=x.parser)==null?void 0:r.yy;if(!(o instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),Y(t,o)},"parse")},H=b((e,t,o,r)=>{const n=r.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=B(t);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())I(f,$,y,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),I=b((e,t,o,{rowHeight:r,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=o*(r+l)+l;for(const s of t){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),K={draw:H},O={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},j=b(({packet:e}={})=>{const t=u(O,e);return`
1
+ import{_ as b,G as u,K as B,e as C,l as w,b as S,a as D,p as T,q as z,g as E,s as P,H as F,E as A,z as W}from"./vendor-mermaid-DA4JIJaA.js";import{p as _}from"./chunk-4BX2VUAB-Dg65rhkh.js";import{p as N}from"./wardley-RL74JXVD-DIGH9Gor.js";import"./vendor-markdown-yOmFo5hK.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-BpW-8RO2.js";import"./vendor-charts-fIPNnfk-.js";import"./min-CEPPgGqS.js";import"./_baseUniq-C-LHgpwK.js";var L=F.packet,m,v=(m=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=z,this.getAccDescription=E,this.setAccDescription=P}getConfig(){const t=u({...L,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},b(m,"PacketDB"),m),M=1e4,Y=b((e,t)=>{_(e,t);let o=-1,r=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??(a=o+1),a!==o+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${o+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??(i=a+(d??1)-1),d??(d=i-a+1),o=i,w.debug(`Packet block ${a} - ${o} with label ${c}`);r.length<=l+1&&t.getPacket().length<M;){const[p,s]=G({start:a,end:i,bits:d,label:c},n,l);if(r.push(p),p.end+1===n*l&&(t.pushWord(r),r=[],n++),!s)break;({start:a,end:i,bits:d,label:c}=s)}}t.pushWord(r)},"populate"),G=b((e,t,o)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*o)return[e,void 0];const r=t*o-1,n=t*o;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{var r;const t=await N("packet",e),o=(r=x.parser)==null?void 0:r.yy;if(!(o instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),Y(t,o)},"parse")},H=b((e,t,o,r)=>{const n=r.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),s=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(s?0:a),k=d*c+2,f=B(t);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())I(f,$,y,l);f.append("text").text(s).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),I=b((e,t,o,{rowHeight:r,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=o*(r+l)+l;for(const s of t){const h=s.start%i*a+1,g=(s.end-s.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(s.label),!d)continue;const k=s.end===s.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(s.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(s.end)}},"drawWord"),K={draw:H},O={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},j=b(({packet:e}={})=>{const t=u(O,e);return`
2
2
  .packetByte {
3
3
  font-size: ${t.byteFontSize};
4
4
  }
@@ -1,4 +1,4 @@
1
- import{g as Bt}from"./chunk-55IACEB6-zGTUbgou.js";import{s as Ft}from"./chunk-EDXVE4YY-CPKsbfnW.js";import{_ as p,b as Yt,a as Pt,s as zt,g as Gt,p as Kt,q as Ut,c as rt,l as V,z as Zt,x as jt,B as Wt,C as Qt,D as Xt,o as Ht,r as qt,d as Jt,u as $t}from"./vendor-mermaid-BAz0MwVj.js";import"./vendor-markdown-DrUBuQ-c.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-Dvkx9eba.js";import"./vendor-charts-DHCOhRb3.js";var gt=function(){var s=p(function(I,n,a,l){for(a=a||{},l=I.length;l--;a[I[l]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],o=[1,10],h=[1,11],c=[1,12],u=[1,13],f=[1,23],d=[1,24],k=[1,25],W=[1,26],Q=[1,27],T=[1,19],X=[1,28],B=[1,29],D=[1,20],R=[1,18],S=[1,21],x=[1,22],at=[1,36],ct=[1,37],ot=[1,38],lt=[1,39],ht=[1,40],F=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],O=[1,45],N=[1,46],Y=[1,55],P=[40,48,50,51,52,70,71],z=[1,66],G=[1,64],A=[1,61],K=[1,65],U=[1,67],H=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],bt=[65,66,67,68,69],mt=[1,84],kt=[1,83],Et=[1,81],Tt=[1,82],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],q=[1,92],J=[1,91],$=[1,90],Z=[19,58],Ot=[1,101],Nt=[1,100],ut=[19,58,60,62],dt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:p(function(n,a,l,r,y,t,j){var e=t.length-1;switch(y){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 59:case 67:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 79:case 80:this.$=t[e].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=t[e];break;case 60:t[e].push(t[e-1]),this.$=t[e];break;case 61:this.$={type:t[e-1],name:t[e]};break;case 62:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 63:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 64:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 65:case 66:case 69:this.$=t[e];break;case 68:t[e-2].push(t[e]),this.$=t[e-2];break;case 70:this.$=t[e].replace(/"/g,"");break;case 71:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:f,34:d,35:k,36:W,37:Q,40:T,43:X,44:B,48:D,50:R,51:S,52:x},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:30,11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:f,34:d,35:k,36:W,37:Q,40:T,43:X,44:B,48:D,50:R,51:S,52:x},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:at,66:ct,67:ot,68:lt,69:ht}),{23:[1,41]},{25:[1,42]},{27:[1,43]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(F,[2,54]),s(F,[2,55]),s(F,[2,56]),s(F,[2,57]),s(F,[2,58]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},s(i,[2,4]),{11:49,40:T,48:D,50:R,51:S,52:x},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:Y},{11:56,40:T,48:D,50:R,51:S,52:x},{64:57,70:[1,58],71:[1,59]},s(P,[2,72]),s(P,[2,73]),s(P,[2,74]),s(P,[2,75]),s(P,[2,76]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:z,38:60,41:G,42:A,45:62,46:63,48:K,49:U},s(H,[2,37]),s(H,[2,38]),{16:68,40:O,41:N,42:A},{13:z,38:69,41:G,42:A,45:62,46:63,48:K,49:U},{13:[1,70],15:[1,71]},s(i,[2,17],{63:35,12:72,17:[1,73],42:A,65:at,66:ct,67:ot,68:lt,69:ht}),{19:[1,74]},s(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:Y},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:at,66:ct,67:ot,68:lt,69:ht},s(bt,[2,77]),s(bt,[2,78]),{6:mt,10:kt,39:80,42:Et,47:Tt},{40:[1,85],41:[1,86]},s(St,[2,43],{46:87,13:z,41:G,48:K,49:U}),s(L,[2,45]),s(L,[2,50]),s(L,[2,51]),s(L,[2,52]),s(L,[2,53]),s(i,[2,41],{42:A}),{6:mt,10:kt,39:88,42:Et,47:Tt},{14:89,40:q,50:J,72:$},{16:93,40:O,41:N},{11:94,40:T,48:D,50:R,51:S,52:x},{18:95,19:[1,96],53:53,54:54,58:Y},s(i,[2,12]),{19:[2,60]},s(Z,[2,61],{56:97,57:98,59:99,61:Ot,62:Nt}),s([19,58,61,62],[2,66]),s(i,[2,22],{15:[1,103],17:[1,102]}),s([40,48,50,51,52],[2,71]),s(i,[2,36]),{13:z,41:G,45:104,46:63,48:K,49:U},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(H,[2,39]),s(H,[2,40]),s(L,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,79]),s(i,[2,80]),s(i,[2,81]),{13:[1,105],42:A},{13:[1,107],15:[1,106]},{19:[1,108]},s(i,[2,15]),s(Z,[2,62],{57:109,60:[1,110],62:Nt}),s(Z,[2,63]),s(ut,[2,67]),s(Z,[2,70]),s(ut,[2,69]),{18:111,19:[1,112],53:53,54:54,58:Y},{16:113,40:O,41:N},s(St,[2,44],{46:87,13:z,41:G,48:K,49:U}),{14:114,40:q,50:J,72:$},{16:115,40:O,41:N},{14:116,40:q,50:J,72:$},s(i,[2,13]),s(Z,[2,64]),{59:117,61:Ot},{19:[1,118]},s(i,[2,20]),s(i,[2,23],{17:[1,119],42:A}),s(i,[2,11]),{13:[1,120],42:A},s(i,[2,10]),s(ut,[2,68]),s(i,[2,18]),{18:121,19:[1,122],53:53,54:54,58:Y},{14:123,40:q,50:J,72:$},{19:[1,124]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:p(function(n,a){if(a.recoverable)this.trace(n);else{var l=new Error(n);throw l.hash=a,l}},"parseError"),parse:p(function(n){var a=this,l=[0],r=[],y=[null],t=[],j=this.table,e="",et=0,At=0,Lt=2,It=1,wt=t.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(C.yy[pt]=this.yy[pt]);_.setInput(n,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var yt=_.yylloc;t.push(yt);var Vt=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(b){l.length=l.length-2*b,y.length=y.length-b,t.length=t.length-b}p(Mt,"popStack");function Rt(){var b;return b=r.pop()||_.lex()||It,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}p(Rt,"lex");for(var g,v,m,ft,w={},st,E,xt,it;;){if(v=l[l.length-1],this.defaultActions[v]?m=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=Rt()),m=j[v]&&j[v][g]),typeof m>"u"||!m.length||!m[0]){var _t="";it=[];for(st in j[v])this.terminals_[st]&&st>Lt&&it.push("'"+this.terminals_[st]+"'");_.showPosition?_t="Parse error on line "+(et+1)+`:
1
+ import{g as Bt}from"./chunk-55IACEB6-CUbVVgja.js";import{s as Ft}from"./chunk-EDXVE4YY-B_pb0EHW.js";import{_ as p,b as Yt,a as Pt,s as zt,g as Gt,p as Kt,q as Ut,c as rt,l as V,z as Zt,x as jt,B as Wt,C as Qt,D as Xt,o as Ht,r as qt,d as Jt,u as $t}from"./vendor-mermaid-DA4JIJaA.js";import"./vendor-markdown-yOmFo5hK.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-BpW-8RO2.js";import"./vendor-charts-fIPNnfk-.js";var gt=function(){var s=p(function(I,n,a,l){for(a=a||{},l=I.length;l--;a[I[l]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],o=[1,10],h=[1,11],c=[1,12],u=[1,13],f=[1,23],d=[1,24],k=[1,25],W=[1,26],Q=[1,27],T=[1,19],X=[1,28],B=[1,29],D=[1,20],R=[1,18],S=[1,21],x=[1,22],at=[1,36],ct=[1,37],ot=[1,38],lt=[1,39],ht=[1,40],F=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],O=[1,45],N=[1,46],Y=[1,55],P=[40,48,50,51,52,70,71],z=[1,66],G=[1,64],A=[1,61],K=[1,65],U=[1,67],H=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],bt=[65,66,67,68,69],mt=[1,84],kt=[1,83],Et=[1,81],Tt=[1,82],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],q=[1,92],J=[1,91],$=[1,90],Z=[19,58],Ot=[1,101],Nt=[1,100],ut=[19,58,60,62],dt={trace:p(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",51:"DECIMAL_NUM",52:"ENTITY_ONE",58:"ATTRIBUTE_WORD",60:",",61:"ATTRIBUTE_KEY",62:"COMMENT",65:"ZERO_OR_ONE",66:"ZERO_OR_MORE",67:"ONE_OR_MORE",68:"ONLY_ONE",69:"MD_PARENT",70:"NON_IDENTIFYING",71:"IDENTIFYING",72:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:p(function(n,a,l,r,y,t,j){var e=t.length-1;switch(y){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 59:case 67:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 79:case 80:this.$=t[e].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 81:this.$=t[e];break;case 60:t[e].push(t[e-1]),this.$=t[e];break;case 61:this.$={type:t[e-1],name:t[e]};break;case 62:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 63:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 64:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 65:case 66:case 69:this.$=t[e];break;case 68:t[e-2].push(t[e]),this.$=t[e-2];break;case 70:this.$=t[e].replace(/"/g,"");break;case 71:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:f,34:d,35:k,36:W,37:Q,40:T,43:X,44:B,48:D,50:R,51:S,52:x},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:30,11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:f,34:d,35:k,36:W,37:Q,40:T,43:X,44:B,48:D,50:R,51:S,52:x},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:at,66:ct,67:ot,68:lt,69:ht}),{23:[1,41]},{25:[1,42]},{27:[1,43]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(F,[2,54]),s(F,[2,55]),s(F,[2,56]),s(F,[2,57]),s(F,[2,58]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},s(i,[2,4]),{11:49,40:T,48:D,50:R,51:S,52:x},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:Y},{11:56,40:T,48:D,50:R,51:S,52:x},{64:57,70:[1,58],71:[1,59]},s(P,[2,72]),s(P,[2,73]),s(P,[2,74]),s(P,[2,75]),s(P,[2,76]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:z,38:60,41:G,42:A,45:62,46:63,48:K,49:U},s(H,[2,37]),s(H,[2,38]),{16:68,40:O,41:N,42:A},{13:z,38:69,41:G,42:A,45:62,46:63,48:K,49:U},{13:[1,70],15:[1,71]},s(i,[2,17],{63:35,12:72,17:[1,73],42:A,65:at,66:ct,67:ot,68:lt,69:ht}),{19:[1,74]},s(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:Y},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:at,66:ct,67:ot,68:lt,69:ht},s(bt,[2,77]),s(bt,[2,78]),{6:mt,10:kt,39:80,42:Et,47:Tt},{40:[1,85],41:[1,86]},s(St,[2,43],{46:87,13:z,41:G,48:K,49:U}),s(L,[2,45]),s(L,[2,50]),s(L,[2,51]),s(L,[2,52]),s(L,[2,53]),s(i,[2,41],{42:A}),{6:mt,10:kt,39:88,42:Et,47:Tt},{14:89,40:q,50:J,72:$},{16:93,40:O,41:N},{11:94,40:T,48:D,50:R,51:S,52:x},{18:95,19:[1,96],53:53,54:54,58:Y},s(i,[2,12]),{19:[2,60]},s(Z,[2,61],{56:97,57:98,59:99,61:Ot,62:Nt}),s([19,58,61,62],[2,66]),s(i,[2,22],{15:[1,103],17:[1,102]}),s([40,48,50,51,52],[2,71]),s(i,[2,36]),{13:z,41:G,45:104,46:63,48:K,49:U},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(H,[2,39]),s(H,[2,40]),s(L,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,79]),s(i,[2,80]),s(i,[2,81]),{13:[1,105],42:A},{13:[1,107],15:[1,106]},{19:[1,108]},s(i,[2,15]),s(Z,[2,62],{57:109,60:[1,110],62:Nt}),s(Z,[2,63]),s(ut,[2,67]),s(Z,[2,70]),s(ut,[2,69]),{18:111,19:[1,112],53:53,54:54,58:Y},{16:113,40:O,41:N},s(St,[2,44],{46:87,13:z,41:G,48:K,49:U}),{14:114,40:q,50:J,72:$},{16:115,40:O,41:N},{14:116,40:q,50:J,72:$},s(i,[2,13]),s(Z,[2,64]),{59:117,61:Ot},{19:[1,118]},s(i,[2,20]),s(i,[2,23],{17:[1,119],42:A}),s(i,[2,11]),{13:[1,120],42:A},s(i,[2,10]),s(ut,[2,68]),s(i,[2,18]),{18:121,19:[1,122],53:53,54:54,58:Y},{14:123,40:q,50:J,72:$},{19:[1,124]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:p(function(n,a){if(a.recoverable)this.trace(n);else{var l=new Error(n);throw l.hash=a,l}},"parseError"),parse:p(function(n){var a=this,l=[0],r=[],y=[null],t=[],j=this.table,e="",et=0,At=0,Lt=2,It=1,wt=t.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(C.yy[pt]=this.yy[pt]);_.setInput(n,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var yt=_.yylloc;t.push(yt);var Vt=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(b){l.length=l.length-2*b,y.length=y.length-b,t.length=t.length-b}p(Mt,"popStack");function Rt(){var b;return b=r.pop()||_.lex()||It,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}p(Rt,"lex");for(var g,v,m,ft,w={},st,E,xt,it;;){if(v=l[l.length-1],this.defaultActions[v]?m=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=Rt()),m=j[v]&&j[v][g]),typeof m>"u"||!m.length||!m[0]){var _t="";it=[];for(st in j[v])this.terminals_[st]&&st>Lt&&it.push("'"+this.terminals_[st]+"'");_.showPosition?_t="Parse error on line "+(et+1)+`:
2
2
  `+_.showPosition()+`
3
3
  Expecting `+it.join(", ")+", got '"+(this.terminals_[g]||g)+"'":_t="Parse error on line "+(et+1)+": Unexpected "+(g==It?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(_t,{text:_.match,token:this.terminals_[g]||g,line:_.yylineno,loc:yt,expected:it})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(m[0]){case 1:l.push(g),y.push(_.yytext),t.push(_.yylloc),l.push(m[1]),g=null,At=_.yyleng,e=_.yytext,et=_.yylineno,yt=_.yylloc;break;case 2:if(E=this.productions_[m[1]][1],w.$=y[y.length-E],w._$={first_line:t[t.length-(E||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(E||1)].first_column,last_column:t[t.length-1].last_column},Vt&&(w._$.range=[t[t.length-(E||1)].range[0],t[t.length-1].range[1]]),ft=this.performAction.apply(w,[e,At,et,C.yy,m[1],y,t].concat(wt)),typeof ft<"u")return ft;E&&(l=l.slice(0,-1*E*2),y=y.slice(0,-1*E),t=t.slice(0,-1*E)),l.push(this.productions_[m[1]][0]),y.push(w.$),t.push(w._$),xt=j[l[l.length-2]][l[l.length-1]],l.push(xt);break;case 3:return!0}}return!0},"parse")},Dt=function(){var I={EOF:1,parseError:p(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:p(function(n,a){return this.yy=a||this.yy||{},this._input=n,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:p(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.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),n},"input"),unput:p(function(n){var a=n.length,l=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;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),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===r.length?this.yylloc.first_column:0)+r[r.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(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
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:p(function(n){this.unput(this.match.slice(n))},"less"),pastInput:p(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{g as Ht}from"./chunk-FMBD7UC4-u1fsHgLk.js";import{_ as m,n as Mt,l as J,c as g1,o as Xt,r as Qt,u as rt,b as Jt,s as Zt,p as $t,a as te,g as ee,q as se,k as ie,t as re,J as ae,v as ne,x as st,d as it,y as ue,z as le,A as oe,B as ce,C as he}from"./vendor-mermaid-BAz0MwVj.js";import{c as de}from"./chunk-YZCP3GAM-SnPgbijx.js";import{g as pe}from"./chunk-55IACEB6-zGTUbgou.js";import{s as fe}from"./chunk-EDXVE4YY-CPKsbfnW.js";import"./vendor-markdown-DrUBuQ-c.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-Dvkx9eba.js";import"./vendor-charts-DHCOhRb3.js";var ge="flowchart-",w1,be=(w1=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Jt,this.setAccDescription=Zt,this.setDiagramTitle=$t,this.getAccTitle=te,this.getAccDescription=ee,this.getDiagramTitle=se,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return ie.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const n of this.vertices.values())if(n.id===i)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,n,a,u,o,p,c={},k){var K,E;if(!i||i.trim().length===0)return;let r;if(k!==void 0){let f;k.includes(`
1
+ import{g as Ht}from"./chunk-FMBD7UC4-B0r7CE0W.js";import{_ as m,n as Mt,l as J,c as g1,o as Xt,r as Qt,u as rt,b as Jt,s as Zt,p as $t,a as te,g as ee,q as se,k as ie,t as re,J as ae,v as ne,x as st,d as it,y as ue,z as le,A as oe,B as ce,C as he}from"./vendor-mermaid-DA4JIJaA.js";import{c as de}from"./chunk-YZCP3GAM-DdAJ9t55.js";import{g as pe}from"./chunk-55IACEB6-CUbVVgja.js";import{s as fe}from"./chunk-EDXVE4YY-B_pb0EHW.js";import"./vendor-markdown-yOmFo5hK.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-BpW-8RO2.js";import"./vendor-charts-fIPNnfk-.js";var ge="flowchart-",w1,be=(w1=class{constructor(){this.vertexCounter=0,this.config=g1(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Jt,this.setAccDescription=Zt,this.setDiagramTitle=$t,this.getAccTitle=te,this.getAccDescription=ee,this.getDiagramTitle=se,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return ie.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const n of this.vertices.values())if(n.id===i)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,n,a,u,o,p,c={},k){var K,E;if(!i||i.trim().length===0)return;let r;if(k!==void 0){let f;k.includes(`
2
2
  `)?f=k+`
3
3
  `:f=`{
4
4
  `+k+`
@@ -1,4 +1,4 @@
1
- import{g as ue,s as de,q as fe,p as he,a as me,b as ke,_ as c,c as nt,d as mt,e as ye,l as et,au as ge,av as pe,k as ve,j as Te,z as xe,u as be}from"./vendor-mermaid-BAz0MwVj.js";import{d as P,y as we,z as _e}from"./vendor-antd-Dvkx9eba.js";import{g as Zt}from"./vendor-i18n-BNURlJ23.js";import{H as De,I as Ce,J as Se,E as Ee,K as Ie,L as Nt,M as zt,N as Me,O as Ae,P as Fe,Q as $e,R as Le,S as Oe,T as We,U as Bt,V as qt,W as Ht,X as jt,Y as Xt}from"./vendor-charts-DHCOhRb3.js";import"./vendor-markdown-DrUBuQ-c.js";var kt={exports:{}},Ye=kt.exports,Ut;function Re(){return Ut||(Ut=1,function(t,r){(function(n,i){t.exports=i()})(Ye,function(){var n="day";return function(i,a,k){var T=function(A){return A.add(4-A.isoWeekday(),n)},C=a.prototype;C.isoWeekYear=function(){return T(this).year()},C.isoWeek=function(A){if(!this.$utils().u(A))return this.add(7*(A-this.isoWeek()),n);var D,$,L,O,W=T(this),_=(D=this.isoWeekYear(),$=this.$u,L=($?k.utc:k)().year(D).startOf("year"),O=4-L.isoWeekday(),L.isoWeekday()>4&&(O+=7),L.add(O,n));return W.diff(_,"week")+1},C.isoWeekday=function(A){return this.$utils().u(A)?this.day()||7:this.day(this.day()%7?A:A-7)};var Y=C.startOf;C.startOf=function(A,D){var $=this.$utils(),L=!!$.u(D)||D;return $.p(A)==="isoweek"?L?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):Y.bind(this)(A,D)}}})}(kt)),kt.exports}var Pe=Re();const Ve=Zt(Pe);var yt={exports:{}},Ne=yt.exports,Gt;function ze(){return Gt||(Gt=1,function(t,r){(function(n,i){t.exports=i()})(Ne,function(){var n,i,a=1e3,k=6e4,T=36e5,C=864e5,Y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,A=31536e6,D=2628e6,$=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,L={years:A,months:D,days:C,hours:T,minutes:k,seconds:a,milliseconds:1,weeks:6048e5},O=function(I){return I instanceof X},W=function(I,v,f){return new X(I,f,v.$l)},_=function(I){return i.p(I)+"s"},J=function(I){return I<0},z=function(I){return J(I)?Math.ceil(I):Math.floor(I)},Z=function(I){return Math.abs(I)},q=function(I,v){return I?J(I)?{negative:!0,format:""+Z(I)+v}:{negative:!1,format:""+I+v}:{negative:!1,format:""}},X=function(){function I(f,u,y){var g=this;if(this.$d={},this.$l=y,f===void 0&&(this.$ms=0,this.parseFromMilliseconds()),u)return W(f*L[_(u)],this);if(typeof f=="number")return this.$ms=f,this.parseFromMilliseconds(),this;if(typeof f=="object")return Object.keys(f).forEach(function(o){g.$d[_(o)]=f[o]}),this.calMilliseconds(),this;if(typeof f=="string"){var p=f.match($);if(p){var m=p.slice(2).map(function(o){return o!=null?Number(o):0});return this.$d.years=m[0],this.$d.months=m[1],this.$d.weeks=m[2],this.$d.days=m[3],this.$d.hours=m[4],this.$d.minutes=m[5],this.$d.seconds=m[6],this.calMilliseconds(),this}}return this}var v=I.prototype;return v.calMilliseconds=function(){var f=this;this.$ms=Object.keys(this.$d).reduce(function(u,y){return u+(f.$d[y]||0)*L[y]},0)},v.parseFromMilliseconds=function(){var f=this.$ms;this.$d.years=z(f/A),f%=A,this.$d.months=z(f/D),f%=D,this.$d.days=z(f/C),f%=C,this.$d.hours=z(f/T),f%=T,this.$d.minutes=z(f/k),f%=k,this.$d.seconds=z(f/a),f%=a,this.$d.milliseconds=f},v.toISOString=function(){var f=q(this.$d.years,"Y"),u=q(this.$d.months,"M"),y=+this.$d.days||0;this.$d.weeks&&(y+=7*this.$d.weeks);var g=q(y,"D"),p=q(this.$d.hours,"H"),m=q(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var l=q(o,"S"),h=f.negative||u.negative||g.negative||p.negative||m.negative||l.negative,d=p.format||m.format||l.format?"T":"",x=(h?"-":"")+"P"+f.format+u.format+g.format+d+p.format+m.format+l.format;return x==="P"||x==="-P"?"P0D":x},v.toJSON=function(){return this.toISOString()},v.format=function(f){var u=f||"YYYY-MM-DDTHH:mm:ss",y={Y:this.$d.years,YY:i.s(this.$d.years,2,"0"),YYYY:i.s(this.$d.years,4,"0"),M:this.$d.months,MM:i.s(this.$d.months,2,"0"),D:this.$d.days,DD:i.s(this.$d.days,2,"0"),H:this.$d.hours,HH:i.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:i.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:i.s(this.$d.seconds,2,"0"),SSS:i.s(this.$d.milliseconds,3,"0")};return u.replace(Y,function(g,p){return p||String(y[g])})},v.as=function(f){return this.$ms/L[_(f)]},v.get=function(f){var u=this.$ms,y=_(f);return y==="milliseconds"?u%=1e3:u=y==="weeks"?z(u/L[y]):this.$d[y],u||0},v.add=function(f,u,y){var g;return g=u?f*L[_(u)]:O(f)?f.$ms:W(f,this).$ms,W(this.$ms+g*(y?-1:1),this)},v.subtract=function(f,u){return this.add(f,u,!0)},v.locale=function(f){var u=this.clone();return u.$l=f,u},v.clone=function(){return W(this.$ms,this)},v.humanize=function(f){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!f)},v.valueOf=function(){return this.asMilliseconds()},v.milliseconds=function(){return this.get("milliseconds")},v.asMilliseconds=function(){return this.as("milliseconds")},v.seconds=function(){return this.get("seconds")},v.asSeconds=function(){return this.as("seconds")},v.minutes=function(){return this.get("minutes")},v.asMinutes=function(){return this.as("minutes")},v.hours=function(){return this.get("hours")},v.asHours=function(){return this.as("hours")},v.days=function(){return this.get("days")},v.asDays=function(){return this.as("days")},v.weeks=function(){return this.get("weeks")},v.asWeeks=function(){return this.as("weeks")},v.months=function(){return this.get("months")},v.asMonths=function(){return this.as("months")},v.years=function(){return this.get("years")},v.asYears=function(){return this.as("years")},I}(),Q=function(I,v,f){return I.add(v.years()*f,"y").add(v.months()*f,"M").add(v.days()*f,"d").add(v.hours()*f,"h").add(v.minutes()*f,"m").add(v.seconds()*f,"s").add(v.milliseconds()*f,"ms")};return function(I,v,f){n=f,i=f().$utils(),f.duration=function(g,p){var m=f.locale();return W(g,{$l:m},p)},f.isDuration=O;var u=v.prototype.add,y=v.prototype.subtract;v.prototype.add=function(g,p){return O(g)?Q(this,g,1):u.bind(this)(g,p)},v.prototype.subtract=function(g,p){return O(g)?Q(this,g,-1):y.bind(this)(g,p)}}})}(yt)),yt.exports}var Be=ze();const qe=Zt(Be);var Dt=function(){var t=c(function(m,o,l,h){for(l=l||{},h=m.length;h--;l[m[h]]=o);return l},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],a=[1,28],k=[1,29],T=[1,30],C=[1,31],Y=[1,32],A=[1,33],D=[1,34],$=[1,9],L=[1,10],O=[1,11],W=[1,12],_=[1,13],J=[1,14],z=[1,15],Z=[1,16],q=[1,19],X=[1,20],Q=[1,21],I=[1,22],v=[1,23],f=[1,25],u=[1,35],y={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:c(function(o,l,h,d,x,s,F){var e=s.length-1;switch(x){case 1:return s[e-1];case 2:this.$=[];break;case 3:s[e-1].push(s[e]),this.$=s[e-1];break;case 4:case 5:this.$=s[e];break;case 6:case 7:this.$=[];break;case 8:d.setWeekday("monday");break;case 9:d.setWeekday("tuesday");break;case 10:d.setWeekday("wednesday");break;case 11:d.setWeekday("thursday");break;case 12:d.setWeekday("friday");break;case 13:d.setWeekday("saturday");break;case 14:d.setWeekday("sunday");break;case 15:d.setWeekend("friday");break;case 16:d.setWeekend("saturday");break;case 17:d.setDateFormat(s[e].substr(11)),this.$=s[e].substr(11);break;case 18:d.enableInclusiveEndDates(),this.$=s[e].substr(18);break;case 19:d.TopAxis(),this.$=s[e].substr(8);break;case 20:d.setAxisFormat(s[e].substr(11)),this.$=s[e].substr(11);break;case 21:d.setTickInterval(s[e].substr(13)),this.$=s[e].substr(13);break;case 22:d.setExcludes(s[e].substr(9)),this.$=s[e].substr(9);break;case 23:d.setIncludes(s[e].substr(9)),this.$=s[e].substr(9);break;case 24:d.setTodayMarker(s[e].substr(12)),this.$=s[e].substr(12);break;case 27:d.setDiagramTitle(s[e].substr(6)),this.$=s[e].substr(6);break;case 28:this.$=s[e].trim(),d.setAccTitle(this.$);break;case 29:case 30:this.$=s[e].trim(),d.setAccDescription(this.$);break;case 31:d.addSection(s[e].substr(8)),this.$=s[e].substr(8);break;case 33:d.addTask(s[e-1],s[e]),this.$="task";break;case 34:this.$=s[e-1],d.setClickEvent(s[e-1],s[e],null);break;case 35:this.$=s[e-2],d.setClickEvent(s[e-2],s[e-1],s[e]);break;case 36:this.$=s[e-2],d.setClickEvent(s[e-2],s[e-1],null),d.setLink(s[e-2],s[e]);break;case 37:this.$=s[e-3],d.setClickEvent(s[e-3],s[e-2],s[e-1]),d.setLink(s[e-3],s[e]);break;case 38:this.$=s[e-2],d.setClickEvent(s[e-2],s[e],null),d.setLink(s[e-2],s[e-1]);break;case 39:this.$=s[e-3],d.setClickEvent(s[e-3],s[e-1],s[e]),d.setLink(s[e-3],s[e-2]);break;case 40:this.$=s[e-1],d.setLink(s[e-1],s[e]);break;case 41:case 47:this.$=s[e-1]+" "+s[e];break;case 42:case 43:case 45:this.$=s[e-2]+" "+s[e-1]+" "+s[e];break;case 44:case 46:this.$=s[e-3]+" "+s[e-2]+" "+s[e-1]+" "+s[e];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:a,15:k,16:T,17:C,18:Y,19:18,20:A,21:D,22:$,23:L,24:O,25:W,26:_,27:J,28:z,29:Z,30:q,31:X,33:Q,35:I,36:v,37:24,38:f,40:u},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:k,16:T,17:C,18:Y,19:18,20:A,21:D,22:$,23:L,24:O,25:W,26:_,27:J,28:z,29:Z,30:q,31:X,33:Q,35:I,36:v,37:24,38:f,40:u},t(r,[2,5]),t(r,[2,6]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),t(r,[2,27]),{32:[1,37]},{34:[1,38]},t(r,[2,30]),t(r,[2,31]),t(r,[2,32]),{39:[1,39]},t(r,[2,8]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{41:[1,40],43:[1,41]},t(r,[2,4]),t(r,[2,28]),t(r,[2,29]),t(r,[2,33]),t(r,[2,34],{42:[1,42],43:[1,43]}),t(r,[2,40],{41:[1,44]}),t(r,[2,35],{43:[1,45]}),t(r,[2,36]),t(r,[2,38],{42:[1,46]}),t(r,[2,37]),t(r,[2,39])],defaultActions:{},parseError:c(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:c(function(o){var l=this,h=[0],d=[],x=[null],s=[],F=this.table,e="",b=0,M=0,E=2,S=1,V=s.slice.call(arguments,1),w=Object.create(this.lexer),U={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(U.yy[ct]=this.yy[ct]);w.setInput(o,U.yy),U.yy.lexer=w,U.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var xt=w.yylloc;s.push(xt);var ce=w.options&&w.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function le(B){h.length=h.length-2*B,x.length=x.length-B,s.length=s.length-B}c(le,"popStack");function Pt(){var B;return B=d.pop()||w.lex()||S,typeof B!="number"&&(B instanceof Array&&(d=B,B=d.pop()),B=l.symbols_[B]||B),B}c(Pt,"lex");for(var N,tt,H,bt,it={},ft,G,Vt,ht;;){if(tt=h[h.length-1],this.defaultActions[tt]?H=this.defaultActions[tt]:((N===null||typeof N>"u")&&(N=Pt()),H=F[tt]&&F[tt][N]),typeof H>"u"||!H.length||!H[0]){var wt="";ht=[];for(ft in F[tt])this.terminals_[ft]&&ft>E&&ht.push("'"+this.terminals_[ft]+"'");w.showPosition?wt="Parse error on line "+(b+1)+`:
1
+ import{g as ue,s as de,q as fe,p as he,a as me,b as ke,_ as c,c as nt,d as mt,e as ye,l as et,au as ge,av as pe,k as ve,j as Te,z as xe,u as be}from"./vendor-mermaid-DA4JIJaA.js";import{d as P,y as we,z as _e}from"./vendor-antd-BpW-8RO2.js";import{g as Zt}from"./vendor-i18n-BNURlJ23.js";import{H as De,I as Ce,J as Se,E as Ee,K as Ie,L as Nt,M as zt,N as Me,O as Ae,P as Fe,Q as $e,R as Le,S as Oe,T as We,U as Bt,V as qt,W as Ht,X as jt,Y as Xt}from"./vendor-charts-fIPNnfk-.js";import"./vendor-markdown-yOmFo5hK.js";var kt={exports:{}},Ye=kt.exports,Ut;function Re(){return Ut||(Ut=1,function(t,r){(function(n,i){t.exports=i()})(Ye,function(){var n="day";return function(i,a,k){var T=function(A){return A.add(4-A.isoWeekday(),n)},C=a.prototype;C.isoWeekYear=function(){return T(this).year()},C.isoWeek=function(A){if(!this.$utils().u(A))return this.add(7*(A-this.isoWeek()),n);var D,$,L,O,W=T(this),_=(D=this.isoWeekYear(),$=this.$u,L=($?k.utc:k)().year(D).startOf("year"),O=4-L.isoWeekday(),L.isoWeekday()>4&&(O+=7),L.add(O,n));return W.diff(_,"week")+1},C.isoWeekday=function(A){return this.$utils().u(A)?this.day()||7:this.day(this.day()%7?A:A-7)};var Y=C.startOf;C.startOf=function(A,D){var $=this.$utils(),L=!!$.u(D)||D;return $.p(A)==="isoweek"?L?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):Y.bind(this)(A,D)}}})}(kt)),kt.exports}var Pe=Re();const Ve=Zt(Pe);var yt={exports:{}},Ne=yt.exports,Gt;function ze(){return Gt||(Gt=1,function(t,r){(function(n,i){t.exports=i()})(Ne,function(){var n,i,a=1e3,k=6e4,T=36e5,C=864e5,Y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,A=31536e6,D=2628e6,$=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,L={years:A,months:D,days:C,hours:T,minutes:k,seconds:a,milliseconds:1,weeks:6048e5},O=function(I){return I instanceof X},W=function(I,v,f){return new X(I,f,v.$l)},_=function(I){return i.p(I)+"s"},J=function(I){return I<0},z=function(I){return J(I)?Math.ceil(I):Math.floor(I)},Z=function(I){return Math.abs(I)},q=function(I,v){return I?J(I)?{negative:!0,format:""+Z(I)+v}:{negative:!1,format:""+I+v}:{negative:!1,format:""}},X=function(){function I(f,u,y){var g=this;if(this.$d={},this.$l=y,f===void 0&&(this.$ms=0,this.parseFromMilliseconds()),u)return W(f*L[_(u)],this);if(typeof f=="number")return this.$ms=f,this.parseFromMilliseconds(),this;if(typeof f=="object")return Object.keys(f).forEach(function(o){g.$d[_(o)]=f[o]}),this.calMilliseconds(),this;if(typeof f=="string"){var p=f.match($);if(p){var m=p.slice(2).map(function(o){return o!=null?Number(o):0});return this.$d.years=m[0],this.$d.months=m[1],this.$d.weeks=m[2],this.$d.days=m[3],this.$d.hours=m[4],this.$d.minutes=m[5],this.$d.seconds=m[6],this.calMilliseconds(),this}}return this}var v=I.prototype;return v.calMilliseconds=function(){var f=this;this.$ms=Object.keys(this.$d).reduce(function(u,y){return u+(f.$d[y]||0)*L[y]},0)},v.parseFromMilliseconds=function(){var f=this.$ms;this.$d.years=z(f/A),f%=A,this.$d.months=z(f/D),f%=D,this.$d.days=z(f/C),f%=C,this.$d.hours=z(f/T),f%=T,this.$d.minutes=z(f/k),f%=k,this.$d.seconds=z(f/a),f%=a,this.$d.milliseconds=f},v.toISOString=function(){var f=q(this.$d.years,"Y"),u=q(this.$d.months,"M"),y=+this.$d.days||0;this.$d.weeks&&(y+=7*this.$d.weeks);var g=q(y,"D"),p=q(this.$d.hours,"H"),m=q(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var l=q(o,"S"),h=f.negative||u.negative||g.negative||p.negative||m.negative||l.negative,d=p.format||m.format||l.format?"T":"",x=(h?"-":"")+"P"+f.format+u.format+g.format+d+p.format+m.format+l.format;return x==="P"||x==="-P"?"P0D":x},v.toJSON=function(){return this.toISOString()},v.format=function(f){var u=f||"YYYY-MM-DDTHH:mm:ss",y={Y:this.$d.years,YY:i.s(this.$d.years,2,"0"),YYYY:i.s(this.$d.years,4,"0"),M:this.$d.months,MM:i.s(this.$d.months,2,"0"),D:this.$d.days,DD:i.s(this.$d.days,2,"0"),H:this.$d.hours,HH:i.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:i.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:i.s(this.$d.seconds,2,"0"),SSS:i.s(this.$d.milliseconds,3,"0")};return u.replace(Y,function(g,p){return p||String(y[g])})},v.as=function(f){return this.$ms/L[_(f)]},v.get=function(f){var u=this.$ms,y=_(f);return y==="milliseconds"?u%=1e3:u=y==="weeks"?z(u/L[y]):this.$d[y],u||0},v.add=function(f,u,y){var g;return g=u?f*L[_(u)]:O(f)?f.$ms:W(f,this).$ms,W(this.$ms+g*(y?-1:1),this)},v.subtract=function(f,u){return this.add(f,u,!0)},v.locale=function(f){var u=this.clone();return u.$l=f,u},v.clone=function(){return W(this.$ms,this)},v.humanize=function(f){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!f)},v.valueOf=function(){return this.asMilliseconds()},v.milliseconds=function(){return this.get("milliseconds")},v.asMilliseconds=function(){return this.as("milliseconds")},v.seconds=function(){return this.get("seconds")},v.asSeconds=function(){return this.as("seconds")},v.minutes=function(){return this.get("minutes")},v.asMinutes=function(){return this.as("minutes")},v.hours=function(){return this.get("hours")},v.asHours=function(){return this.as("hours")},v.days=function(){return this.get("days")},v.asDays=function(){return this.as("days")},v.weeks=function(){return this.get("weeks")},v.asWeeks=function(){return this.as("weeks")},v.months=function(){return this.get("months")},v.asMonths=function(){return this.as("months")},v.years=function(){return this.get("years")},v.asYears=function(){return this.as("years")},I}(),Q=function(I,v,f){return I.add(v.years()*f,"y").add(v.months()*f,"M").add(v.days()*f,"d").add(v.hours()*f,"h").add(v.minutes()*f,"m").add(v.seconds()*f,"s").add(v.milliseconds()*f,"ms")};return function(I,v,f){n=f,i=f().$utils(),f.duration=function(g,p){var m=f.locale();return W(g,{$l:m},p)},f.isDuration=O;var u=v.prototype.add,y=v.prototype.subtract;v.prototype.add=function(g,p){return O(g)?Q(this,g,1):u.bind(this)(g,p)},v.prototype.subtract=function(g,p){return O(g)?Q(this,g,-1):y.bind(this)(g,p)}}})}(yt)),yt.exports}var Be=ze();const qe=Zt(Be);var Dt=function(){var t=c(function(m,o,l,h){for(l=l||{},h=m.length;h--;l[m[h]]=o);return l},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],a=[1,28],k=[1,29],T=[1,30],C=[1,31],Y=[1,32],A=[1,33],D=[1,34],$=[1,9],L=[1,10],O=[1,11],W=[1,12],_=[1,13],J=[1,14],z=[1,15],Z=[1,16],q=[1,19],X=[1,20],Q=[1,21],I=[1,22],v=[1,23],f=[1,25],u=[1,35],y={trace:c(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:c(function(o,l,h,d,x,s,F){var e=s.length-1;switch(x){case 1:return s[e-1];case 2:this.$=[];break;case 3:s[e-1].push(s[e]),this.$=s[e-1];break;case 4:case 5:this.$=s[e];break;case 6:case 7:this.$=[];break;case 8:d.setWeekday("monday");break;case 9:d.setWeekday("tuesday");break;case 10:d.setWeekday("wednesday");break;case 11:d.setWeekday("thursday");break;case 12:d.setWeekday("friday");break;case 13:d.setWeekday("saturday");break;case 14:d.setWeekday("sunday");break;case 15:d.setWeekend("friday");break;case 16:d.setWeekend("saturday");break;case 17:d.setDateFormat(s[e].substr(11)),this.$=s[e].substr(11);break;case 18:d.enableInclusiveEndDates(),this.$=s[e].substr(18);break;case 19:d.TopAxis(),this.$=s[e].substr(8);break;case 20:d.setAxisFormat(s[e].substr(11)),this.$=s[e].substr(11);break;case 21:d.setTickInterval(s[e].substr(13)),this.$=s[e].substr(13);break;case 22:d.setExcludes(s[e].substr(9)),this.$=s[e].substr(9);break;case 23:d.setIncludes(s[e].substr(9)),this.$=s[e].substr(9);break;case 24:d.setTodayMarker(s[e].substr(12)),this.$=s[e].substr(12);break;case 27:d.setDiagramTitle(s[e].substr(6)),this.$=s[e].substr(6);break;case 28:this.$=s[e].trim(),d.setAccTitle(this.$);break;case 29:case 30:this.$=s[e].trim(),d.setAccDescription(this.$);break;case 31:d.addSection(s[e].substr(8)),this.$=s[e].substr(8);break;case 33:d.addTask(s[e-1],s[e]),this.$="task";break;case 34:this.$=s[e-1],d.setClickEvent(s[e-1],s[e],null);break;case 35:this.$=s[e-2],d.setClickEvent(s[e-2],s[e-1],s[e]);break;case 36:this.$=s[e-2],d.setClickEvent(s[e-2],s[e-1],null),d.setLink(s[e-2],s[e]);break;case 37:this.$=s[e-3],d.setClickEvent(s[e-3],s[e-2],s[e-1]),d.setLink(s[e-3],s[e]);break;case 38:this.$=s[e-2],d.setClickEvent(s[e-2],s[e],null),d.setLink(s[e-2],s[e-1]);break;case 39:this.$=s[e-3],d.setClickEvent(s[e-3],s[e-1],s[e]),d.setLink(s[e-3],s[e-2]);break;case 40:this.$=s[e-1],d.setLink(s[e-1],s[e]);break;case 41:case 47:this.$=s[e-1]+" "+s[e];break;case 42:case 43:case 45:this.$=s[e-2]+" "+s[e-1]+" "+s[e];break;case 44:case 46:this.$=s[e-3]+" "+s[e-2]+" "+s[e-1]+" "+s[e];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:a,15:k,16:T,17:C,18:Y,19:18,20:A,21:D,22:$,23:L,24:O,25:W,26:_,27:J,28:z,29:Z,30:q,31:X,33:Q,35:I,36:v,37:24,38:f,40:u},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:k,16:T,17:C,18:Y,19:18,20:A,21:D,22:$,23:L,24:O,25:W,26:_,27:J,28:z,29:Z,30:q,31:X,33:Q,35:I,36:v,37:24,38:f,40:u},t(r,[2,5]),t(r,[2,6]),t(r,[2,17]),t(r,[2,18]),t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),t(r,[2,22]),t(r,[2,23]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),t(r,[2,27]),{32:[1,37]},{34:[1,38]},t(r,[2,30]),t(r,[2,31]),t(r,[2,32]),{39:[1,39]},t(r,[2,8]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{41:[1,40],43:[1,41]},t(r,[2,4]),t(r,[2,28]),t(r,[2,29]),t(r,[2,33]),t(r,[2,34],{42:[1,42],43:[1,43]}),t(r,[2,40],{41:[1,44]}),t(r,[2,35],{43:[1,45]}),t(r,[2,36]),t(r,[2,38],{42:[1,46]}),t(r,[2,37]),t(r,[2,39])],defaultActions:{},parseError:c(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:c(function(o){var l=this,h=[0],d=[],x=[null],s=[],F=this.table,e="",b=0,M=0,E=2,S=1,V=s.slice.call(arguments,1),w=Object.create(this.lexer),U={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(U.yy[ct]=this.yy[ct]);w.setInput(o,U.yy),U.yy.lexer=w,U.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var xt=w.yylloc;s.push(xt);var ce=w.options&&w.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function le(B){h.length=h.length-2*B,x.length=x.length-B,s.length=s.length-B}c(le,"popStack");function Pt(){var B;return B=d.pop()||w.lex()||S,typeof B!="number"&&(B instanceof Array&&(d=B,B=d.pop()),B=l.symbols_[B]||B),B}c(Pt,"lex");for(var N,tt,H,bt,it={},ft,G,Vt,ht;;){if(tt=h[h.length-1],this.defaultActions[tt]?H=this.defaultActions[tt]:((N===null||typeof N>"u")&&(N=Pt()),H=F[tt]&&F[tt][N]),typeof H>"u"||!H.length||!H[0]){var wt="";ht=[];for(ft in F[tt])this.terminals_[ft]&&ft>E&&ht.push("'"+this.terminals_[ft]+"'");w.showPosition?wt="Parse error on line "+(b+1)+`:
2
2
  `+w.showPosition()+`
3
3
  Expecting `+ht.join(", ")+", got '"+(this.terminals_[N]||N)+"'":wt="Parse error on line "+(b+1)+": Unexpected "+(N==S?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(wt,{text:w.match,token:this.terminals_[N]||N,line:w.yylineno,loc:xt,expected:ht})}if(H[0]instanceof Array&&H.length>1)throw new Error("Parse Error: multiple actions possible at state: "+tt+", token: "+N);switch(H[0]){case 1:h.push(N),x.push(w.yytext),s.push(w.yylloc),h.push(H[1]),N=null,M=w.yyleng,e=w.yytext,b=w.yylineno,xt=w.yylloc;break;case 2:if(G=this.productions_[H[1]][1],it.$=x[x.length-G],it._$={first_line:s[s.length-(G||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(G||1)].first_column,last_column:s[s.length-1].last_column},ce&&(it._$.range=[s[s.length-(G||1)].range[0],s[s.length-1].range[1]]),bt=this.performAction.apply(it,[e,M,b,U.yy,H[1],x,s].concat(V)),typeof bt<"u")return bt;G&&(h=h.slice(0,-1*G*2),x=x.slice(0,-1*G),s=s.slice(0,-1*G)),h.push(this.productions_[H[1]][0]),x.push(it.$),s.push(it._$),Vt=F[h[h.length-2]][h[h.length-1]],h.push(Vt);break;case 3:return!0}}return!0},"parse")},g=function(){var m={EOF:1,parseError:c(function(l,h){if(this.yy.parser)this.yy.parser.parseError(l,h);else throw new Error(l)},"parseError"),setInput:c(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:c(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:c(function(o){var l=o.length,h=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 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),h.length-1&&(this.yylineno-=h.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:h?(h.length===d.length?this.yylloc.first_column:0)+d[d.length-h.length].length-h[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:c(function(){return this._more=!0,this},"more"),reject:c(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
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:c(function(o){this.unput(this.match.slice(o))},"less"),pastInput:c(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:c(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:c(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{p as he}from"./chunk-4BX2VUAB-cdpbCefI.js";import{I as $e}from"./chunk-QZHKN3VN-Cziuusiz.js";import{q as fe,p as ge,s as ue,g as ye,a as xe,b as me,_ as $,E as Q,l as k,d as pe,c as z,u as be,F as we,z as ke,k as L,G as ve,H as Ee,I as Ce}from"./vendor-mermaid-BAz0MwVj.js";import{p as Be}from"./wardley-RL74JXVD-BeMJefeY.js";import"./vendor-markdown-DrUBuQ-c.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-Dvkx9eba.js";import"./vendor-charts-DHCOhRb3.js";import"./min-CRXMcNks.js";import"./_baseUniq-JxvxITJ4.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=Ee.gitGraph,D=$(()=>ve({...Te,...Q().gitGraph}),"getConfig"),i=new $e(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ce({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Ie=$(function(){return i.records.options},"getOptions"),Re=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Se=$(function(){i.reset(),ke()},"clear"),Ae=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),qe=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=$(function(){return i.records.currBranch},"getCurrentBranch"),We=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Ie,commit:Re,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Se,getBranchesAsObjArray:Ae,getBranches:De,getCommits:qe,getCommitsArray:se,getCurrentBranch:Pe,getDirection:We,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Be("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,R=2,S=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),J=12,ee=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),A=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Qe=$(()=>{B.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Je.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${A(s,S,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${A(s,S,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${A(s,S,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-R).attr("y",t.y+13.5).attr("width",h.width+2*R).attr("height",h.height+2*R),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
1
+ import{p as he}from"./chunk-4BX2VUAB-Dg65rhkh.js";import{I as $e}from"./chunk-QZHKN3VN-DbGqS_ab.js";import{q as fe,p as ge,s as ue,g as ye,a as xe,b as me,_ as $,E as Q,l as k,d as pe,c as z,u as be,F as we,z as ke,k as L,G as ve,H as Ee,I as Ce}from"./vendor-mermaid-DA4JIJaA.js";import{p as Be}from"./wardley-RL74JXVD-DIGH9Gor.js";import"./vendor-markdown-yOmFo5hK.js";import"./vendor-i18n-BNURlJ23.js";import"./vendor-antd-BpW-8RO2.js";import"./vendor-charts-fIPNnfk-.js";import"./min-CEPPgGqS.js";import"./_baseUniq-C-LHgpwK.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=Ee.gitGraph,D=$(()=>ve({...Te,...Q().gitGraph}),"getConfig"),i=new $e(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ce({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Ie=$(function(){return i.records.options},"getOptions"),Re=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Se=$(function(){i.reset(),ke()},"clear"),Ae=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),qe=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=$(function(){return i.records.currBranch},"getCurrentBranch"),We=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Ie,commit:Re,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Se,getBranchesAsObjArray:Ae,getBranches:De,getCommits:qe,getCommitsArray:se,getCurrentBranch:Pe,getDirection:We,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Be("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,R=2,S=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),J=12,ee=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),A=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Qe=$(()=>{B.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Je.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${A(s,S,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${A(s,S,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${A(s,S,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-R).attr("y",t.y+13.5).attr("width",h.width+2*R).attr("height",h.height+2*R),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
2
2
  ${o-n/2-M/2},${u+R}
3
3
  ${o-n/2-M/2},${u-R}
4
4
  ${t.posWithOffset-n/2-M},${u-x-R}
@@ -1 +1 @@
1
- import{aA as T,aB as C,aC as z,aD as R,aE as S,aF as k,aG as V,aH as L,aI as K,aJ as j,aK as ee,aL as te,aM as re,aN as se,aO as ne,aP as ie,as as ae,aQ as oe,aR as ue,aS as he,aT as y,aU as v,aV as $}from"./vendor-mermaid-BAz0MwVj.js";import{k as d,g as H,s as de,e as ce,f as fe,h as ge,j as le,d as _e,l as be,b as pe,m,n as g,r as ye}from"./_baseUniq-JxvxITJ4.js";function me(t,e){return t&&T(e,d(e),t)}function je(t,e){return t&&T(e,C(e),t)}function Te(t,e){return T(t,H(t),e)}var Oe=Object.getOwnPropertySymbols,Y=Oe?function(t){for(var e=[];t;)ce(e,H(t)),t=z(t);return e}:de;function Ae(t,e){return T(t,Y(t),e)}function Ee(t){return fe(t,C,Y)}var Ce=Object.prototype,Le=Ce.hasOwnProperty;function we(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Le.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Ne(t,e){var r=e?R(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Fe=/\w*$/;function Pe(t){var e=new t.constructor(t.source,Fe.exec(t));return e.lastIndex=t.lastIndex,e}var I=S?S.prototype:void 0,D=I?I.valueOf:void 0;function Se(t){return D?Object(D.call(t)):{}}var ve="[object Boolean]",$e="[object Date]",Ie="[object Map]",De="[object Number]",Me="[object RegExp]",Ge="[object Set]",Ue="[object String]",xe="[object Symbol]",Be="[object ArrayBuffer]",Re="[object DataView]",Ve="[object Float32Array]",Ke="[object Float64Array]",He="[object Int8Array]",Ye="[object Int16Array]",qe="[object Int32Array]",Je="[object Uint8Array]",Qe="[object Uint8ClampedArray]",We="[object Uint16Array]",Xe="[object Uint32Array]";function Ze(t,e,r){var s=t.constructor;switch(e){case Be:return R(t);case ve:case $e:return new s(+t);case Re:return Ne(t,r);case Ve:case Ke:case He:case Ye:case qe:case Je:case Qe:case We:case Xe:return k(t,r);case Ie:return new s;case De:case Ue:return new s(t);case Me:return Pe(t);case Ge:return new s;case xe:return Se(t)}}var ze="[object Map]";function ke(t){return V(t)&&L(t)==ze}var M=j&&j.isMap,et=M?K(M):ke,tt="[object Set]";function rt(t){return V(t)&&L(t)==tt}var G=j&&j.isSet,st=G?K(G):rt,nt=1,it=2,at=4,q="[object Arguments]",ot="[object Array]",ut="[object Boolean]",ht="[object Date]",dt="[object Error]",J="[object Function]",ct="[object GeneratorFunction]",ft="[object Map]",gt="[object Number]",Q="[object Object]",lt="[object RegExp]",_t="[object Set]",bt="[object String]",pt="[object Symbol]",yt="[object WeakMap]",mt="[object ArrayBuffer]",jt="[object DataView]",Tt="[object Float32Array]",Ot="[object Float64Array]",At="[object Int8Array]",Et="[object Int16Array]",Ct="[object Int32Array]",Lt="[object Uint8Array]",wt="[object Uint8ClampedArray]",Nt="[object Uint16Array]",Ft="[object Uint32Array]",o={};o[q]=o[ot]=o[mt]=o[jt]=o[ut]=o[ht]=o[Tt]=o[Ot]=o[At]=o[Et]=o[Ct]=o[ft]=o[gt]=o[Q]=o[lt]=o[_t]=o[bt]=o[pt]=o[Lt]=o[wt]=o[Nt]=o[Ft]=!0;o[dt]=o[J]=o[yt]=!1;function O(t,e,r,s,n,a){var i,u=e&nt,h=e&it,X=e&at;if(i!==void 0)return i;if(!ee(t))return t;var w=ae(t);if(w){if(i=we(t),!u)return te(t,i)}else{var _=L(t),N=_==J||_==ct;if(re(t))return se(t,u);if(_==Q||_==q||N&&!n){if(i=h||N?{}:ne(t),!u)return h?Ae(t,je(i,t)):Te(t,me(i,t))}else{if(!o[_])return n?t:{};i=Ze(t,_,u)}}a||(a=new ie);var F=a.get(t);if(F)return F;a.set(t,i),st(t)?t.forEach(function(c){i.add(O(c,e,r,c,t,a))}):et(t)&&t.forEach(function(c,f){i.set(f,O(c,e,r,f,t,a))});var Z=X?h?Ee:le:h?C:d,P=w?void 0:Z(t);return ge(P||t,function(c,f){P&&(f=c,c=t[f]),oe(i,f,O(c,e,r,f,t,a))}),i}function Pt(t,e){return _e(e,function(r){return t[r]})}function A(t){return t==null?[]:Pt(t,d(t))}function b(t){return t===void 0}var St=ue(function(t){return be(pe(t,1,he,!0))}),vt="\0",l="\0",U="";class W{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=y(void 0),this._defaultEdgeLabelFn=y(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[l]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return v(e)||(e=y(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return d(this._nodes)}sources(){var e=this;return m(this.nodes(),function(r){return $(e._in[r])})}sinks(){var e=this;return m(this.nodes(),function(r){return $(e._out[r])})}setNodes(e,r){var s=arguments,n=this;return g(e,function(a){s.length>1?n.setNode(a,r):n.setNode(a)}),this}setNode(e,r){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=l,this._children[e]={},this._children[l][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var r=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],g(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),g(d(this._in[e]),r),delete this._in[e],delete this._preds[e],g(d(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(b(r))r=l;else{r+="";for(var s=r;!b(s);s=this.parent(s))if(s===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==l)return r}}children(e){if(b(e)&&(e=l),this._isCompound){var r=this._children[e];if(r)return d(r)}else{if(e===l)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return d(r)}successors(e){var r=this._sucs[e];if(r)return d(r)}neighbors(e){var r=this.predecessors(e);if(r)return St(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var s=this;g(this._nodes,function(i,u){e(u)&&r.setNode(u,i)}),g(this._edgeObjs,function(i){r.hasNode(i.v)&&r.hasNode(i.w)&&r.setEdge(i,s.edge(i))});var n={};function a(i){var u=s.parent(i);return u===void 0||r.hasNode(u)?(n[i]=u,u):u in n?n[u]:a(u)}return this._isCompound&&g(r.nodes(),function(i){r.setParent(i,a(i))}),r}setDefaultEdgeLabel(e){return v(e)||(e=y(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return A(this._edgeObjs)}setPath(e,r){var s=this,n=arguments;return ye(e,function(a,i){return n.length>1?s.setEdge(a,i,r):s.setEdge(a,i),i}),this}setEdge(){var e,r,s,n,a=!1,i=arguments[0];typeof i=="object"&&i!==null&&"v"in i?(e=i.v,r=i.w,s=i.name,arguments.length===2&&(n=arguments[1],a=!0)):(e=i,r=arguments[1],s=arguments[3],arguments.length>2&&(n=arguments[2],a=!0)),e=""+e,r=""+r,b(s)||(s=""+s);var u=p(this._isDirected,e,r,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,u))return a&&(this._edgeLabels[u]=n),this;if(!b(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[u]=a?n:this._defaultEdgeLabelFn(e,r,s);var h=$t(this._isDirected,e,r,s);return e=h.v,r=h.w,Object.freeze(h),this._edgeObjs[u]=h,x(this._preds[r],e),x(this._sucs[e],r),this._in[r][u]=h,this._out[e][u]=h,this._edgeCount++,this}edge(e,r,s){var n=arguments.length===1?E(this._isDirected,arguments[0]):p(this._isDirected,e,r,s);return this._edgeLabels[n]}hasEdge(e,r,s){var n=arguments.length===1?E(this._isDirected,arguments[0]):p(this._isDirected,e,r,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,n)}removeEdge(e,r,s){var n=arguments.length===1?E(this._isDirected,arguments[0]):p(this._isDirected,e,r,s),a=this._edgeObjs[n];return a&&(e=a.v,r=a.w,delete this._edgeLabels[n],delete this._edgeObjs[n],B(this._preds[r],e),B(this._sucs[e],r),delete this._in[r][n],delete this._out[e][n],this._edgeCount--),this}inEdges(e,r){var s=this._in[e];if(s){var n=A(s);return r?m(n,function(a){return a.v===r}):n}}outEdges(e,r){var s=this._out[e];if(s){var n=A(s);return r?m(n,function(a){return a.w===r}):n}}nodeEdges(e,r){var s=this.inEdges(e,r);if(s)return s.concat(this.outEdges(e,r))}}W.prototype._nodeCount=0;W.prototype._edgeCount=0;function x(t,e){t[e]?t[e]++:t[e]=1}function B(t,e){--t[e]||delete t[e]}function p(t,e,r,s){var n=""+e,a=""+r;if(!t&&n>a){var i=n;n=a,a=i}return n+U+a+U+(b(s)?vt:s)}function $t(t,e,r,s){var n=""+e,a=""+r;if(!t&&n>a){var i=n;n=a,a=i}var u={v:n,w:a};return s&&(u.name=s),u}function E(t,e){return p(t,e.v,e.w,e.name)}export{W as G,O as b,b as i,A as v};
1
+ import{aA as T,aB as C,aC as z,aD as R,aE as S,aF as k,aG as V,aH as L,aI as K,aJ as j,aK as ee,aL as te,aM as re,aN as se,aO as ne,aP as ie,as as ae,aQ as oe,aR as ue,aS as he,aT as y,aU as v,aV as $}from"./vendor-mermaid-DA4JIJaA.js";import{k as d,g as H,s as de,e as ce,f as fe,h as ge,j as le,d as _e,l as be,b as pe,m,n as g,r as ye}from"./_baseUniq-C-LHgpwK.js";function me(t,e){return t&&T(e,d(e),t)}function je(t,e){return t&&T(e,C(e),t)}function Te(t,e){return T(t,H(t),e)}var Oe=Object.getOwnPropertySymbols,Y=Oe?function(t){for(var e=[];t;)ce(e,H(t)),t=z(t);return e}:de;function Ae(t,e){return T(t,Y(t),e)}function Ee(t){return fe(t,C,Y)}var Ce=Object.prototype,Le=Ce.hasOwnProperty;function we(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Le.call(t,"index")&&(r.index=t.index,r.input=t.input),r}function Ne(t,e){var r=e?R(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Fe=/\w*$/;function Pe(t){var e=new t.constructor(t.source,Fe.exec(t));return e.lastIndex=t.lastIndex,e}var I=S?S.prototype:void 0,D=I?I.valueOf:void 0;function Se(t){return D?Object(D.call(t)):{}}var ve="[object Boolean]",$e="[object Date]",Ie="[object Map]",De="[object Number]",Me="[object RegExp]",Ge="[object Set]",Ue="[object String]",xe="[object Symbol]",Be="[object ArrayBuffer]",Re="[object DataView]",Ve="[object Float32Array]",Ke="[object Float64Array]",He="[object Int8Array]",Ye="[object Int16Array]",qe="[object Int32Array]",Je="[object Uint8Array]",Qe="[object Uint8ClampedArray]",We="[object Uint16Array]",Xe="[object Uint32Array]";function Ze(t,e,r){var s=t.constructor;switch(e){case Be:return R(t);case ve:case $e:return new s(+t);case Re:return Ne(t,r);case Ve:case Ke:case He:case Ye:case qe:case Je:case Qe:case We:case Xe:return k(t,r);case Ie:return new s;case De:case Ue:return new s(t);case Me:return Pe(t);case Ge:return new s;case xe:return Se(t)}}var ze="[object Map]";function ke(t){return V(t)&&L(t)==ze}var M=j&&j.isMap,et=M?K(M):ke,tt="[object Set]";function rt(t){return V(t)&&L(t)==tt}var G=j&&j.isSet,st=G?K(G):rt,nt=1,it=2,at=4,q="[object Arguments]",ot="[object Array]",ut="[object Boolean]",ht="[object Date]",dt="[object Error]",J="[object Function]",ct="[object GeneratorFunction]",ft="[object Map]",gt="[object Number]",Q="[object Object]",lt="[object RegExp]",_t="[object Set]",bt="[object String]",pt="[object Symbol]",yt="[object WeakMap]",mt="[object ArrayBuffer]",jt="[object DataView]",Tt="[object Float32Array]",Ot="[object Float64Array]",At="[object Int8Array]",Et="[object Int16Array]",Ct="[object Int32Array]",Lt="[object Uint8Array]",wt="[object Uint8ClampedArray]",Nt="[object Uint16Array]",Ft="[object Uint32Array]",o={};o[q]=o[ot]=o[mt]=o[jt]=o[ut]=o[ht]=o[Tt]=o[Ot]=o[At]=o[Et]=o[Ct]=o[ft]=o[gt]=o[Q]=o[lt]=o[_t]=o[bt]=o[pt]=o[Lt]=o[wt]=o[Nt]=o[Ft]=!0;o[dt]=o[J]=o[yt]=!1;function O(t,e,r,s,n,a){var i,u=e&nt,h=e&it,X=e&at;if(i!==void 0)return i;if(!ee(t))return t;var w=ae(t);if(w){if(i=we(t),!u)return te(t,i)}else{var _=L(t),N=_==J||_==ct;if(re(t))return se(t,u);if(_==Q||_==q||N&&!n){if(i=h||N?{}:ne(t),!u)return h?Ae(t,je(i,t)):Te(t,me(i,t))}else{if(!o[_])return n?t:{};i=Ze(t,_,u)}}a||(a=new ie);var F=a.get(t);if(F)return F;a.set(t,i),st(t)?t.forEach(function(c){i.add(O(c,e,r,c,t,a))}):et(t)&&t.forEach(function(c,f){i.set(f,O(c,e,r,f,t,a))});var Z=X?h?Ee:le:h?C:d,P=w?void 0:Z(t);return ge(P||t,function(c,f){P&&(f=c,c=t[f]),oe(i,f,O(c,e,r,f,t,a))}),i}function Pt(t,e){return _e(e,function(r){return t[r]})}function A(t){return t==null?[]:Pt(t,d(t))}function b(t){return t===void 0}var St=ue(function(t){return be(pe(t,1,he,!0))}),vt="\0",l="\0",U="";class W{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=y(void 0),this._defaultEdgeLabelFn=y(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[l]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return v(e)||(e=y(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return d(this._nodes)}sources(){var e=this;return m(this.nodes(),function(r){return $(e._in[r])})}sinks(){var e=this;return m(this.nodes(),function(r){return $(e._out[r])})}setNodes(e,r){var s=arguments,n=this;return g(e,function(a){s.length>1?n.setNode(a,r):n.setNode(a)}),this}setNode(e,r){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=l,this._children[e]={},this._children[l][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var r=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],g(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),g(d(this._in[e]),r),delete this._in[e],delete this._preds[e],g(d(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(b(r))r=l;else{r+="";for(var s=r;!b(s);s=this.parent(s))if(s===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==l)return r}}children(e){if(b(e)&&(e=l),this._isCompound){var r=this._children[e];if(r)return d(r)}else{if(e===l)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return d(r)}successors(e){var r=this._sucs[e];if(r)return d(r)}neighbors(e){var r=this.predecessors(e);if(r)return St(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var s=this;g(this._nodes,function(i,u){e(u)&&r.setNode(u,i)}),g(this._edgeObjs,function(i){r.hasNode(i.v)&&r.hasNode(i.w)&&r.setEdge(i,s.edge(i))});var n={};function a(i){var u=s.parent(i);return u===void 0||r.hasNode(u)?(n[i]=u,u):u in n?n[u]:a(u)}return this._isCompound&&g(r.nodes(),function(i){r.setParent(i,a(i))}),r}setDefaultEdgeLabel(e){return v(e)||(e=y(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return A(this._edgeObjs)}setPath(e,r){var s=this,n=arguments;return ye(e,function(a,i){return n.length>1?s.setEdge(a,i,r):s.setEdge(a,i),i}),this}setEdge(){var e,r,s,n,a=!1,i=arguments[0];typeof i=="object"&&i!==null&&"v"in i?(e=i.v,r=i.w,s=i.name,arguments.length===2&&(n=arguments[1],a=!0)):(e=i,r=arguments[1],s=arguments[3],arguments.length>2&&(n=arguments[2],a=!0)),e=""+e,r=""+r,b(s)||(s=""+s);var u=p(this._isDirected,e,r,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,u))return a&&(this._edgeLabels[u]=n),this;if(!b(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[u]=a?n:this._defaultEdgeLabelFn(e,r,s);var h=$t(this._isDirected,e,r,s);return e=h.v,r=h.w,Object.freeze(h),this._edgeObjs[u]=h,x(this._preds[r],e),x(this._sucs[e],r),this._in[r][u]=h,this._out[e][u]=h,this._edgeCount++,this}edge(e,r,s){var n=arguments.length===1?E(this._isDirected,arguments[0]):p(this._isDirected,e,r,s);return this._edgeLabels[n]}hasEdge(e,r,s){var n=arguments.length===1?E(this._isDirected,arguments[0]):p(this._isDirected,e,r,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,n)}removeEdge(e,r,s){var n=arguments.length===1?E(this._isDirected,arguments[0]):p(this._isDirected,e,r,s),a=this._edgeObjs[n];return a&&(e=a.v,r=a.w,delete this._edgeLabels[n],delete this._edgeObjs[n],B(this._preds[r],e),B(this._sucs[e],r),delete this._in[r][n],delete this._out[e][n],this._edgeCount--),this}inEdges(e,r){var s=this._in[e];if(s){var n=A(s);return r?m(n,function(a){return a.v===r}):n}}outEdges(e,r){var s=this._out[e];if(s){var n=A(s);return r?m(n,function(a){return a.w===r}):n}}nodeEdges(e,r){var s=this.inEdges(e,r);if(s)return s.concat(this.outEdges(e,r))}}W.prototype._nodeCount=0;W.prototype._edgeCount=0;function x(t,e){t[e]?t[e]++:t[e]=1}function B(t,e){--t[e]||delete t[e]}function p(t,e,r,s){var n=""+e,a=""+r;if(!t&&n>a){var i=n;n=a,a=i}return n+U+a+U+(b(s)?vt:s)}function $t(t,e,r,s){var n=""+e,a=""+r;if(!t&&n>a){var i=n;n=a,a=i}var u={v:n,w:a};return s&&(u.name=s),u}function E(t,e){return p(t,e.v,e.w,e.name)}export{W as G,O as b,b as i,A as v};
@@ -1 +1 @@
1
- import{j as s}from"./vendor-markdown-DrUBuQ-c.js";import{u as b,a as x}from"./vendor-i18n-BNURlJ23.js";import{u as i}from"./App-DCXI8jTD.js";import{A as w,F as n,B as l,i as T,L as c,T as k,j as F,P as L,k as R,M as v,I as d}from"./vendor-antd-Dvkx9eba.js";import"./main-BgGBpmTu.js";import"./vendor-charts-DHCOhRb3.js";import"./vendor-mermaid-BAz0MwVj.js";const O=()=>{const{t}=b(),{message:r}=w.useApp(),f=i(e=>e.systemPrompts),P=i(e=>e.addSystemPrompt),j=i(e=>e.updateSystemPrompt),M=i(e=>e.deleteSystemPrompt),[h,u]=x.useState(!1),[a,p]=x.useState(null),[o]=n.useForm(),g=(e=null)=>{if(e!=null&&e.isDefault){r.warning(t("settings.systemPromptManager.defaultPromptLocked"));return}p(e),o.setFieldsValue(e||{name:"",description:"",content:""}),u(!0)},y=()=>{u(!1),p(null),o.resetFields()},S=async()=>{if(a!=null&&a.isDefault){r.warning(t("settings.systemPromptManager.defaultPromptLocked"));return}try{const e=await o.validateFields();a?(await j({...a,...e}),r.success(t("settings.systemPromptManager.updateSuccess"))):(await P(e),r.success(t("settings.systemPromptManager.addSuccess"))),y()}catch(e){console.error("Failed to save prompt:",e),r.error(e instanceof Error?e.message:t("settings.systemPromptManager.saveError"))}},I=async e=>{try{await M(e),r.success(t("settings.systemPromptManager.deleteSuccess"))}catch(m){console.error("Failed to delete prompt:",m),r.error(m instanceof Error?m.message:t("settings.systemPromptManager.deleteError"))}};return s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[s.jsx("h2",{children:t("settings.systemPromptManager.title")}),s.jsx(l,{type:"primary",icon:s.jsx(T,{}),onClick:()=>g(),children:t("settings.systemPromptManager.addButton")})]}),s.jsx(c,{itemLayout:"horizontal",dataSource:f,renderItem:e=>s.jsxs(c.Item,{actions:[e.isDefault?null:s.jsx(l,{type:"text",icon:s.jsx(F,{}),onClick:()=>g(e)}),e.isDefault?null:s.jsx(L,{title:t("settings.systemPromptManager.deleteConfirm"),onConfirm:()=>I(e.id),okText:t("common.yes"),cancelText:t("common.no"),children:s.jsx(l,{type:"text",danger:!0,icon:s.jsx(R,{}),"aria-label":t("common.delete")})})],children:[s.jsx(c.Item.Meta,{title:e.name,description:e.description||e.content.substring(0,200)+(e.content.length>200?"...":"")}),e.isDefault&&s.jsx(k,{children:t("settings.systemPromptManager.defaultTag")})]})}),s.jsx(v,{title:t(a?"settings.systemPromptManager.editTitle":"settings.systemPromptManager.addTitle"),open:h,onOk:S,onCancel:y,width:"60%",forceRender:!0,children:s.jsxs(n,{form:o,layout:"vertical",name:"system_prompt_form",children:[s.jsx(n.Item,{name:"name",label:t("settings.systemPromptManager.nameLabel"),rules:[{required:!0,message:t("settings.systemPromptManager.nameRequired")}],children:s.jsx(d,{})}),s.jsx(n.Item,{name:"description",label:t("settings.systemPromptManager.descriptionLabel"),rules:[{required:!1,message:t("settings.systemPromptManager.descriptionRequired")}],children:s.jsx(d.TextArea,{rows:3})}),s.jsx(n.Item,{name:"content",label:t("settings.systemPromptManager.contentLabel"),rules:[{required:!0,message:t("settings.systemPromptManager.contentRequired")}],children:s.jsx(d.TextArea,{rows:10})})]})})]})};export{O as default};
1
+ import{j as s}from"./vendor-markdown-yOmFo5hK.js";import{u as b,a as x}from"./vendor-i18n-BNURlJ23.js";import{u as i}from"./App-CIBUzKFV.js";import{A as w,F as n,B as l,i as T,L as c,T as k,j as F,P as L,k as R,M as v,I as d}from"./vendor-antd-BpW-8RO2.js";import"./main-_fs1sZGu.js";import"./vendor-charts-fIPNnfk-.js";import"./vendor-mermaid-DA4JIJaA.js";const O=()=>{const{t}=b(),{message:r}=w.useApp(),f=i(e=>e.systemPrompts),P=i(e=>e.addSystemPrompt),j=i(e=>e.updateSystemPrompt),M=i(e=>e.deleteSystemPrompt),[h,u]=x.useState(!1),[a,p]=x.useState(null),[o]=n.useForm(),g=(e=null)=>{if(e!=null&&e.isDefault){r.warning(t("settings.systemPromptManager.defaultPromptLocked"));return}p(e),o.setFieldsValue(e||{name:"",description:"",content:""}),u(!0)},y=()=>{u(!1),p(null),o.resetFields()},S=async()=>{if(a!=null&&a.isDefault){r.warning(t("settings.systemPromptManager.defaultPromptLocked"));return}try{const e=await o.validateFields();a?(await j({...a,...e}),r.success(t("settings.systemPromptManager.updateSuccess"))):(await P(e),r.success(t("settings.systemPromptManager.addSuccess"))),y()}catch(e){console.error("Failed to save prompt:",e),r.error(e instanceof Error?e.message:t("settings.systemPromptManager.saveError"))}},I=async e=>{try{await M(e),r.success(t("settings.systemPromptManager.deleteSuccess"))}catch(m){console.error("Failed to delete prompt:",m),r.error(m instanceof Error?m.message:t("settings.systemPromptManager.deleteError"))}};return s.jsxs("div",{children:[s.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[s.jsx("h2",{children:t("settings.systemPromptManager.title")}),s.jsx(l,{type:"primary",icon:s.jsx(T,{}),onClick:()=>g(),children:t("settings.systemPromptManager.addButton")})]}),s.jsx(c,{itemLayout:"horizontal",dataSource:f,renderItem:e=>s.jsxs(c.Item,{actions:[e.isDefault?null:s.jsx(l,{type:"text",icon:s.jsx(F,{}),onClick:()=>g(e)}),e.isDefault?null:s.jsx(L,{title:t("settings.systemPromptManager.deleteConfirm"),onConfirm:()=>I(e.id),okText:t("common.yes"),cancelText:t("common.no"),children:s.jsx(l,{type:"text",danger:!0,icon:s.jsx(R,{}),"aria-label":t("common.delete")})})],children:[s.jsx(c.Item.Meta,{title:e.name,description:e.description||e.content.substring(0,200)+(e.content.length>200?"...":"")}),e.isDefault&&s.jsx(k,{children:t("settings.systemPromptManager.defaultTag")})]})}),s.jsx(v,{title:t(a?"settings.systemPromptManager.editTitle":"settings.systemPromptManager.addTitle"),open:h,onOk:S,onCancel:y,width:"60%",forceRender:!0,children:s.jsxs(n,{form:o,layout:"vertical",name:"system_prompt_form",children:[s.jsx(n.Item,{name:"name",label:t("settings.systemPromptManager.nameLabel"),rules:[{required:!0,message:t("settings.systemPromptManager.nameRequired")}],children:s.jsx(d,{})}),s.jsx(n.Item,{name:"description",label:t("settings.systemPromptManager.descriptionLabel"),rules:[{required:!1,message:t("settings.systemPromptManager.descriptionRequired")}],children:s.jsx(d.TextArea,{rows:3})}),s.jsx(n.Item,{name:"content",label:t("settings.systemPromptManager.contentLabel"),rules:[{required:!0,message:t("settings.systemPromptManager.contentRequired")}],children:s.jsx(d.TextArea,{rows:10})})]})})]})};export{O as default};
@@ -1 +1 @@
1
- var ee=Object.defineProperty;var te=(i,t,s)=>t in i?ee(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s;var z=(i,t,s)=>te(i,typeof t!="symbol"?t+"":t,s);import{j as e}from"./vendor-markdown-DrUBuQ-c.js";import{u as V,a as o,i as q}from"./vendor-i18n-BNURlJ23.js";import{w as D,a as se}from"./App-DCXI8jTD.js";import{A as O,t as Q,m as B,M as G,S as j,B as P,D as N,G as ae,H as re,J,C as ie,v as Z,E as M,L as W,q as C,K as _,N as Y,O as ne,Q as ce,U as oe,p as L,I as le,V as de}from"./vendor-antd-Dvkx9eba.js";import"./main-BgGBpmTu.js";import"./vendor-charts-DHCOhRb3.js";import"./vendor-mermaid-BAz0MwVj.js";const he=({visible:i,onClose:t,onSelect:s})=>{const{t:n}=V(),{message:r}=O.useApp(),{token:a}=Q.useToken(),{Text:c}=B,[p,w]=o.useState(!1),[l,x]=o.useState(""),[u,b]=o.useState(),[S,k]=o.useState([]),[v,y]=o.useState([]);o.useEffect(()=>{i&&g()},[i]);const g=async d=>{w(!0);try{const m=await D.browseFolder(d);x(m.current_path),b(m.parent_path),k(m.folders)}catch(m){console.error("Failed to load directory:",m),r.error("Unable to read folder")}finally{w(!1)}},f=d=>{y([...v,l]),g(d.path)},E=()=>{u&&(y(v.slice(0,-1)),g(u))},T=()=>{y([]),g()},I=()=>{s(l),t()},R=()=>{if(!l)return[];const d=l.split(/[/\\]/).filter(Boolean);return l.startsWith("/")&&d.unshift("/"),d},A=d=>{const F=R().slice(0,d+1).join("/"),$=(l.startsWith("/"),F);g($)};return e.jsx(G,{title:n("chat.folderBrowser.title"),open:i,onCancel:t,width:700,footer:null,children:e.jsxs(j,{direction:"vertical",size:"middle",style:{width:"100%"},children:[e.jsxs(j,{children:[e.jsx(P,{icon:e.jsx(N,{}),onClick:T,size:"small",children:n("common.home")}),e.jsx(P,{icon:e.jsx(ae,{}),onClick:E,disabled:!u,size:"small",children:n("common.parentDirectory")}),e.jsx(P,{type:"primary",icon:e.jsx(re,{}),onClick:I,size:"small",children:n("chat.folderBrowser.selectCurrent")})]}),e.jsx(J,{children:R().map((d,m)=>e.jsx(J.Item,{children:e.jsx(P,{type:"link",size:"small",onClick:()=>A(m),style:{padding:0},children:d==="/"?e.jsx(N,{}):d})},m))}),e.jsxs(ie,{size:"small",styles:{body:{padding:a.paddingXS}},children:[e.jsx(c,{type:"secondary",style:{fontSize:12},children:n("common.currentPath")})," ",e.jsx(c,{code:!0,children:l})]}),e.jsx(Z,{spinning:p,children:S.length===0&&!p?e.jsx(M,{image:M.PRESENTED_IMAGE_SIMPLE,description:e.jsx(c,{type:"secondary",children:n("chat.folderBrowser.emptyFolder")})}):e.jsx(W,{dataSource:S,style:{maxHeight:400,overflowY:"auto"},renderItem:d=>e.jsx(W.Item,{style:{padding:0},children:e.jsx(P,{type:"text",icon:e.jsx(C,{}),onClick:()=>f(d),style:{width:"100%",textAlign:"left",padding:`${a.paddingXS}px ${a.paddingSM}px`},children:d.name})})})}),e.jsx(c,{type:"secondary",style:{fontSize:12},children:n("chat.folderBrowser.tip")})]})})};class pe{constructor(t={}){z(this,"cache",new Map);z(this,"pendingValidations",new Map);z(this,"options");this.options={debounceMs:t.debounceMs??300,cacheTimeoutMs:t.cacheTimeoutMs??5*60*1e3,maxRetries:t.maxRetries??3}}async validateWorkspace(t){if(!t||t.trim().length===0)return{path:"",is_valid:!1,error_message:q.t("chat.workspace.errorEnterPath")};const s=t.trim(),n=this.getCachedResult(s);if(n)return n;const r=this.pendingValidations.get(s);if(r)return r;const a=this.performValidation(s);this.pendingValidations.set(s,a);try{const c=await a;return this.setCachedResult(s,c),c}finally{this.pendingValidations.delete(s)}}validateWorkspaceDebounced(t,s){let n;return n=setTimeout(async()=>{try{const a=await this.validateWorkspace(t);s(a)}catch(a){const c={path:t,is_valid:!1,error_message:a instanceof Error?a.message:q.t("chat.workspace.checkDescription")};s(c)}},this.options.debounceMs),()=>{clearTimeout(n)}}clearCache(){this.cache.clear()}getCachedResult(t){const s=this.cache.get(t);return s?Date.now()-s.timestamp>this.options.cacheTimeoutMs?(this.cache.delete(t),null):s.result:null}setCachedResult(t,s){this.cache.set(t,{result:s,timestamp:Date.now()})}async performValidation(t,s=0){try{return await se.post("workspace/validate",{path:t})}catch(n){if(s<this.options.maxRetries&&this.isRetryableError(n))return await this.delay(Math.pow(2,s)*1e3),this.performValidation(t,s+1);throw n}}isRetryableError(t){return t instanceof Error?t.message.includes("Failed to fetch")||t.message.includes("HTTP error! status: 5"):!1}delay(t){return new Promise(s=>setTimeout(s,t))}async validateMultiplePaths(t){const n=[];for(let r=0;r<t.length;r+=5){const a=t.slice(r,r+5),c=await Promise.all(a.map(p=>this.validateWorkspace(p)));n.push(...c),r+5<t.length&&await this.delay(100)}return n}}const ue=new pe,me=({value:i="",onChange:t,showRecentWorkspaces:s,showSuggestions:n,onValidationChange:r})=>{const{message:a}=O.useApp(),[c,p]=o.useState(i),[w,l]=o.useState({isValidating:!1,result:null}),[x,u]=o.useState([]),[b,S]=o.useState(!1),[k,v]=o.useState([]),[y,g]=o.useState(!1),[f,E]=o.useState(!1),T=o.useRef(null),I=o.useRef(null);o.useEffect(()=>{p(i)},[i]),o.useEffect(()=>(s&&R(),n&&A(),()=>{T.current&&T.current.abort(),I.current&&I.current()}),[s,n]);const R=o.useCallback(async()=>{g(!0);try{const h=await D.getRecentWorkspaces();u(h.slice(0,5))}catch(h){console.error("Failed to load recent workspaces:",h),u([])}finally{g(!1)}},[]),A=o.useCallback(async()=>{E(!0);try{const h=await D.getPathSuggestions();v(h.suggestions.slice(0,8))}catch(h){console.error("Failed to load suggestions:",h),v([])}finally{E(!1)}},[]),d=o.useCallback(h=>{p(h),t&&t(h),T.current&&T.current.abort(),I.current&&I.current(),h.trim()?(l({isValidating:!0,result:null}),I.current=ue.validateWorkspaceDebounced(h.trim(),U=>{l({isValidating:!1,result:U}),r&&r(U)})):(l({isValidating:!1,result:null}),r&&r(null))},[t,r]),m=o.useCallback(()=>{S(!0)},[]),F=o.useCallback(h=>{d(h),a.success("Folder selected successfully")},[d]),$=o.useCallback(h=>{d(h)},[d]);return{path:c,validationStatus:w,recentWorkspaces:x,suggestions:k,isLoadingRecent:y,isLoadingSuggestions:f,folderBrowserVisible:b,setFolderBrowserVisible:S,handlePathChange:d,handleBrowseClick:m,handleFolderSelect:F,handleWorkspaceSelect:$}},{Text:H}=B,ge=({show:i,isLoading:t,recentWorkspaces:s,onSelect:n,token:r})=>{const{t:a}=V();return i?e.jsxs(_,{vertical:!0,gap:r.marginXS,style:{marginTop:r.marginMD},children:[e.jsxs(j,{style:{paddingInline:r.paddingSM},children:[e.jsx(Y,{}),e.jsx(H,{strong:!0,children:a("chat.workspace.recentTitle")})]}),t?e.jsx(_,{justify:"center",style:{padding:r.paddingSM},children:e.jsx(Z,{size:"small"})}):s.length===0?e.jsx(M,{description:a("chat.workspace.noRecentWorkspaces"),image:M.PRESENTED_IMAGE_SIMPLE,style:{padding:r.paddingSM}}):e.jsx(W,{size:"small",dataSource:s,style:{paddingInline:r.paddingSM},renderItem:c=>e.jsx(W.Item,{style:{padding:0},children:e.jsx(P,{type:"text",onClick:()=>n(c.path),style:{width:"100%",textAlign:"left",padding:`${r.paddingXS}px 0`,height:"auto"},children:e.jsxs(_,{justify:"space-between",align:"center",style:{width:"100%"},children:[e.jsxs(j,{children:[e.jsx(C,{style:{color:r.colorWarning}}),e.jsx(H,{strong:!0,children:c.workspace_name||c.path.split("/").pop()||a("chat.workspace.defaultWorkspaceName")})]}),e.jsx(H,{type:"secondary",ellipsis:{tooltip:c.path},style:{fontSize:12,maxWidth:"55%",textAlign:"right"},children:c.path})]})})})})]}):null},{Text:X}=B,xe=(i,t)=>{switch(i.suggestion_type){case"home":return e.jsx(N,{style:{color:t.colorPrimary}});case"documents":case"desktop":case"downloads":return e.jsx(C,{style:{color:t.colorSuccess}});case"recent":return e.jsx(Y,{style:{color:t.colorWarning}});default:return e.jsx(C,{})}},fe=({show:i,isLoading:t,suggestions:s,onSelect:n,token:r})=>{const{t:a}=V();return i?e.jsxs(_,{vertical:!0,gap:r.marginXS,style:{marginTop:r.marginMD},children:[e.jsxs(j,{style:{paddingInline:r.paddingSM},children:[e.jsx(C,{}),e.jsx(X,{strong:!0,children:a("chat.workspace.suggestedTitle")})]}),t?e.jsx(_,{justify:"center",style:{padding:r.paddingSM},children:e.jsx(Z,{size:"small"})}):s.length===0?e.jsx(M,{description:a("chat.workspace.noSuggestions"),image:M.PRESENTED_IMAGE_SIMPLE,style:{padding:r.paddingSM}}):e.jsx(W,{size:"small",dataSource:s,style:{paddingInline:r.paddingSM},renderItem:c=>e.jsx(W.Item,{style:{padding:0},children:e.jsx(P,{type:"text",onClick:()=>n(c.path),style:{width:"100%",textAlign:"left",padding:`${r.paddingXS}px 0`,height:"auto"},children:e.jsxs(_,{justify:"space-between",align:"center",style:{width:"100%"},children:[e.jsxs(j,{children:[xe(c,r),e.jsx(X,{strong:!0,children:c.name})]}),e.jsx(X,{type:"secondary",ellipsis:{tooltip:c.path},style:{fontSize:12,maxWidth:"55%",textAlign:"right"},children:c.path})]})})})})]}):null},ye=({isValidating:i,result:t,token:s})=>i?e.jsx(ne,{style:{color:s.colorPrimary}}):t?t.is_valid?e.jsx(ce,{style:{color:s.colorSuccess}}):e.jsx(oe,{style:{color:s.colorError}}):null,{Text:K}=B,je=({result:i,token:t})=>{const{t:s}=V();return i?e.jsx("div",{style:{marginTop:t.marginXS},children:i.is_valid?e.jsx(L,{type:"success",message:e.jsxs(j,{children:[e.jsx("span",{children:s("chat.workspace.validWorkspace")}),i.workspace_name&&e.jsxs(K,{type:"secondary",children:["(",i.workspace_name,")"]}),i.file_count!==void 0&&e.jsx(K,{type:"secondary",children:s("chat.workspace.fileCount",{count:i.file_count})})]}),showIcon:!0}):e.jsx(L,{type:"error",message:i.error_message||s("validation.invalidPath"),showIcon:!0})}):null},{Text:we}=B,Se=({value:i="",onChange:t,placeholder:s,disabled:n=!1,allowBrowse:r=!0,showRecentWorkspaces:a=!0,showSuggestions:c=!0,onValidationChange:p,className:w,style:l})=>{const{t:x}=V(),{token:u}=Q.useToken(),b=s??x("chat.workspace.placeholder"),{path:S,validationStatus:k,recentWorkspaces:v,suggestions:y,isLoadingRecent:g,isLoadingSuggestions:f,folderBrowserVisible:E,setFolderBrowserVisible:T,handlePathChange:I,handleBrowseClick:R,handleFolderSelect:A,handleWorkspaceSelect:d}=me({value:i,onChange:t,showRecentWorkspaces:a,showSuggestions:c,onValidationChange:p});return e.jsxs("div",{className:w,style:l,children:[e.jsx(le,{value:S,onChange:m=>I(m.target.value),placeholder:b,disabled:n,size:"middle",style:{width:"100%"},suffix:e.jsx(ye,{isValidating:k.isValidating,result:k.result,token:u}),addonBefore:e.jsxs(j,{children:[e.jsx(C,{}),e.jsx(we,{children:x("chat.workspace.label")})]}),addonAfter:r?e.jsx(P,{"aria-label":x("chat.workspace.browseFolder"),title:x("chat.workspace.browseFolder"),icon:e.jsx(C,{}),onClick:R,disabled:n,type:"text",size:"middle",style:{display:"inline-flex",alignItems:"center"}}):void 0}),e.jsx(je,{result:k.result,token:u}),(a||c)&&e.jsxs(e.Fragment,{children:[e.jsx(de,{style:{margin:"16px 0 12px 0"}}),e.jsx(ge,{show:a,isLoading:g,recentWorkspaces:v,onSelect:d,token:u}),e.jsx(fe,{show:c,isLoading:f,suggestions:y,onSelect:d,token:u})]}),e.jsx(he,{visible:E,onClose:()=>T(!1),onSelect:A})]})},{Title:ke}=B,_e=({open:i,initialPath:t="",loading:s=!1,onSubmit:n,onCancel:r})=>{const{t:a}=V(),{message:c}=O.useApp(),[p,w]=o.useState(t),[l,x]=o.useState(null),[u,b]=o.useState(!1);o.useEffect(()=>{i&&(w(t),x(null))},[i,t]);const S=f=>{w(f)},k=f=>{x(f)},v=async()=>{if(!p.trim()){c.error(a("chat.workspace.errorEnterPath"));return}l&&!l.is_valid?G.confirm({title:a("chat.workspace.invalidTitle"),content:e.jsxs("div",{children:[e.jsx("p",{children:a("chat.workspace.issuesDetected")}),e.jsx("p",{children:l.error_message||a("chat.workspace.invalidTitle")}),e.jsx("p",{children:a("chat.workspace.confirmSaveInvalid")})]}),okText:a("common.saveAnyway"),cancelText:a("common.cancel"),onOk:()=>y()}):y()},y=async()=>{b(!0);try{l!=null&&l.is_valid&&await D.addRecentWorkspace(p.trim(),{workspace_name:l.workspace_name}),n(p.trim())}catch(f){console.error("Failed to save workspace path:",f),c.error(a("chat.workspace.errorSaveFailed"))}finally{b(!1)}},g=!p.trim()||s||u;return e.jsx(G,{open:i,title:e.jsx(j,{children:e.jsx(ke,{level:4,style:{margin:0},children:a("chat.workspace.modalTitle")})}),okText:a("common.save"),cancelText:a("common.cancel"),onOk:v,onCancel:r,okButtonProps:{disabled:g,loading:u||s},width:600,destroyOnClose:!0,children:e.jsxs(j,{direction:"vertical",size:"middle",style:{width:"100%"},children:[e.jsx(L,{message:a("chat.workspace.descriptionTitle"),description:e.jsxs("div",{children:[e.jsx("p",{children:a("chat.workspace.descriptionP1")}),e.jsx("p",{children:a("chat.workspace.descriptionP2")})]}),type:"info",showIcon:!0}),e.jsx(Se,{value:p,onChange:S,onValidationChange:k,placeholder:a("chat.workspace.placeholder"),disabled:u,allowBrowse:!0,showRecentWorkspaces:!0,showSuggestions:!0}),l&&!l.is_valid&&e.jsx(L,{message:a("chat.workspace.checkTitle"),description:l.error_message||a("chat.workspace.checkDescription"),type:"warning",showIcon:!0})]})})};export{_e as default};
1
+ var ee=Object.defineProperty;var te=(i,t,s)=>t in i?ee(i,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[t]=s;var z=(i,t,s)=>te(i,typeof t!="symbol"?t+"":t,s);import{j as e}from"./vendor-markdown-yOmFo5hK.js";import{u as V,a as o,i as q}from"./vendor-i18n-BNURlJ23.js";import{w as D,a as se}from"./App-CIBUzKFV.js";import{A as O,t as Q,m as B,M as G,S as j,B as P,D as N,G as ae,H as re,J,C as ie,v as Z,E as M,L as W,q as C,K as _,N as Y,O as ne,Q as ce,U as oe,p as L,I as le,V as de}from"./vendor-antd-BpW-8RO2.js";import"./main-_fs1sZGu.js";import"./vendor-charts-fIPNnfk-.js";import"./vendor-mermaid-DA4JIJaA.js";const he=({visible:i,onClose:t,onSelect:s})=>{const{t:n}=V(),{message:r}=O.useApp(),{token:a}=Q.useToken(),{Text:c}=B,[p,w]=o.useState(!1),[l,x]=o.useState(""),[u,b]=o.useState(),[S,k]=o.useState([]),[v,y]=o.useState([]);o.useEffect(()=>{i&&g()},[i]);const g=async d=>{w(!0);try{const m=await D.browseFolder(d);x(m.current_path),b(m.parent_path),k(m.folders)}catch(m){console.error("Failed to load directory:",m),r.error("Unable to read folder")}finally{w(!1)}},f=d=>{y([...v,l]),g(d.path)},E=()=>{u&&(y(v.slice(0,-1)),g(u))},T=()=>{y([]),g()},I=()=>{s(l),t()},R=()=>{if(!l)return[];const d=l.split(/[/\\]/).filter(Boolean);return l.startsWith("/")&&d.unshift("/"),d},A=d=>{const F=R().slice(0,d+1).join("/"),$=(l.startsWith("/"),F);g($)};return e.jsx(G,{title:n("chat.folderBrowser.title"),open:i,onCancel:t,width:700,footer:null,children:e.jsxs(j,{direction:"vertical",size:"middle",style:{width:"100%"},children:[e.jsxs(j,{children:[e.jsx(P,{icon:e.jsx(N,{}),onClick:T,size:"small",children:n("common.home")}),e.jsx(P,{icon:e.jsx(ae,{}),onClick:E,disabled:!u,size:"small",children:n("common.parentDirectory")}),e.jsx(P,{type:"primary",icon:e.jsx(re,{}),onClick:I,size:"small",children:n("chat.folderBrowser.selectCurrent")})]}),e.jsx(J,{children:R().map((d,m)=>e.jsx(J.Item,{children:e.jsx(P,{type:"link",size:"small",onClick:()=>A(m),style:{padding:0},children:d==="/"?e.jsx(N,{}):d})},m))}),e.jsxs(ie,{size:"small",styles:{body:{padding:a.paddingXS}},children:[e.jsx(c,{type:"secondary",style:{fontSize:12},children:n("common.currentPath")})," ",e.jsx(c,{code:!0,children:l})]}),e.jsx(Z,{spinning:p,children:S.length===0&&!p?e.jsx(M,{image:M.PRESENTED_IMAGE_SIMPLE,description:e.jsx(c,{type:"secondary",children:n("chat.folderBrowser.emptyFolder")})}):e.jsx(W,{dataSource:S,style:{maxHeight:400,overflowY:"auto"},renderItem:d=>e.jsx(W.Item,{style:{padding:0},children:e.jsx(P,{type:"text",icon:e.jsx(C,{}),onClick:()=>f(d),style:{width:"100%",textAlign:"left",padding:`${a.paddingXS}px ${a.paddingSM}px`},children:d.name})})})}),e.jsx(c,{type:"secondary",style:{fontSize:12},children:n("chat.folderBrowser.tip")})]})})};class pe{constructor(t={}){z(this,"cache",new Map);z(this,"pendingValidations",new Map);z(this,"options");this.options={debounceMs:t.debounceMs??300,cacheTimeoutMs:t.cacheTimeoutMs??5*60*1e3,maxRetries:t.maxRetries??3}}async validateWorkspace(t){if(!t||t.trim().length===0)return{path:"",is_valid:!1,error_message:q.t("chat.workspace.errorEnterPath")};const s=t.trim(),n=this.getCachedResult(s);if(n)return n;const r=this.pendingValidations.get(s);if(r)return r;const a=this.performValidation(s);this.pendingValidations.set(s,a);try{const c=await a;return this.setCachedResult(s,c),c}finally{this.pendingValidations.delete(s)}}validateWorkspaceDebounced(t,s){let n;return n=setTimeout(async()=>{try{const a=await this.validateWorkspace(t);s(a)}catch(a){const c={path:t,is_valid:!1,error_message:a instanceof Error?a.message:q.t("chat.workspace.checkDescription")};s(c)}},this.options.debounceMs),()=>{clearTimeout(n)}}clearCache(){this.cache.clear()}getCachedResult(t){const s=this.cache.get(t);return s?Date.now()-s.timestamp>this.options.cacheTimeoutMs?(this.cache.delete(t),null):s.result:null}setCachedResult(t,s){this.cache.set(t,{result:s,timestamp:Date.now()})}async performValidation(t,s=0){try{return await se.post("workspace/validate",{path:t})}catch(n){if(s<this.options.maxRetries&&this.isRetryableError(n))return await this.delay(Math.pow(2,s)*1e3),this.performValidation(t,s+1);throw n}}isRetryableError(t){return t instanceof Error?t.message.includes("Failed to fetch")||t.message.includes("HTTP error! status: 5"):!1}delay(t){return new Promise(s=>setTimeout(s,t))}async validateMultiplePaths(t){const n=[];for(let r=0;r<t.length;r+=5){const a=t.slice(r,r+5),c=await Promise.all(a.map(p=>this.validateWorkspace(p)));n.push(...c),r+5<t.length&&await this.delay(100)}return n}}const ue=new pe,me=({value:i="",onChange:t,showRecentWorkspaces:s,showSuggestions:n,onValidationChange:r})=>{const{message:a}=O.useApp(),[c,p]=o.useState(i),[w,l]=o.useState({isValidating:!1,result:null}),[x,u]=o.useState([]),[b,S]=o.useState(!1),[k,v]=o.useState([]),[y,g]=o.useState(!1),[f,E]=o.useState(!1),T=o.useRef(null),I=o.useRef(null);o.useEffect(()=>{p(i)},[i]),o.useEffect(()=>(s&&R(),n&&A(),()=>{T.current&&T.current.abort(),I.current&&I.current()}),[s,n]);const R=o.useCallback(async()=>{g(!0);try{const h=await D.getRecentWorkspaces();u(h.slice(0,5))}catch(h){console.error("Failed to load recent workspaces:",h),u([])}finally{g(!1)}},[]),A=o.useCallback(async()=>{E(!0);try{const h=await D.getPathSuggestions();v(h.suggestions.slice(0,8))}catch(h){console.error("Failed to load suggestions:",h),v([])}finally{E(!1)}},[]),d=o.useCallback(h=>{p(h),t&&t(h),T.current&&T.current.abort(),I.current&&I.current(),h.trim()?(l({isValidating:!0,result:null}),I.current=ue.validateWorkspaceDebounced(h.trim(),U=>{l({isValidating:!1,result:U}),r&&r(U)})):(l({isValidating:!1,result:null}),r&&r(null))},[t,r]),m=o.useCallback(()=>{S(!0)},[]),F=o.useCallback(h=>{d(h),a.success("Folder selected successfully")},[d]),$=o.useCallback(h=>{d(h)},[d]);return{path:c,validationStatus:w,recentWorkspaces:x,suggestions:k,isLoadingRecent:y,isLoadingSuggestions:f,folderBrowserVisible:b,setFolderBrowserVisible:S,handlePathChange:d,handleBrowseClick:m,handleFolderSelect:F,handleWorkspaceSelect:$}},{Text:H}=B,ge=({show:i,isLoading:t,recentWorkspaces:s,onSelect:n,token:r})=>{const{t:a}=V();return i?e.jsxs(_,{vertical:!0,gap:r.marginXS,style:{marginTop:r.marginMD},children:[e.jsxs(j,{style:{paddingInline:r.paddingSM},children:[e.jsx(Y,{}),e.jsx(H,{strong:!0,children:a("chat.workspace.recentTitle")})]}),t?e.jsx(_,{justify:"center",style:{padding:r.paddingSM},children:e.jsx(Z,{size:"small"})}):s.length===0?e.jsx(M,{description:a("chat.workspace.noRecentWorkspaces"),image:M.PRESENTED_IMAGE_SIMPLE,style:{padding:r.paddingSM}}):e.jsx(W,{size:"small",dataSource:s,style:{paddingInline:r.paddingSM},renderItem:c=>e.jsx(W.Item,{style:{padding:0},children:e.jsx(P,{type:"text",onClick:()=>n(c.path),style:{width:"100%",textAlign:"left",padding:`${r.paddingXS}px 0`,height:"auto"},children:e.jsxs(_,{justify:"space-between",align:"center",style:{width:"100%"},children:[e.jsxs(j,{children:[e.jsx(C,{style:{color:r.colorWarning}}),e.jsx(H,{strong:!0,children:c.workspace_name||c.path.split("/").pop()||a("chat.workspace.defaultWorkspaceName")})]}),e.jsx(H,{type:"secondary",ellipsis:{tooltip:c.path},style:{fontSize:12,maxWidth:"55%",textAlign:"right"},children:c.path})]})})})})]}):null},{Text:X}=B,xe=(i,t)=>{switch(i.suggestion_type){case"home":return e.jsx(N,{style:{color:t.colorPrimary}});case"documents":case"desktop":case"downloads":return e.jsx(C,{style:{color:t.colorSuccess}});case"recent":return e.jsx(Y,{style:{color:t.colorWarning}});default:return e.jsx(C,{})}},fe=({show:i,isLoading:t,suggestions:s,onSelect:n,token:r})=>{const{t:a}=V();return i?e.jsxs(_,{vertical:!0,gap:r.marginXS,style:{marginTop:r.marginMD},children:[e.jsxs(j,{style:{paddingInline:r.paddingSM},children:[e.jsx(C,{}),e.jsx(X,{strong:!0,children:a("chat.workspace.suggestedTitle")})]}),t?e.jsx(_,{justify:"center",style:{padding:r.paddingSM},children:e.jsx(Z,{size:"small"})}):s.length===0?e.jsx(M,{description:a("chat.workspace.noSuggestions"),image:M.PRESENTED_IMAGE_SIMPLE,style:{padding:r.paddingSM}}):e.jsx(W,{size:"small",dataSource:s,style:{paddingInline:r.paddingSM},renderItem:c=>e.jsx(W.Item,{style:{padding:0},children:e.jsx(P,{type:"text",onClick:()=>n(c.path),style:{width:"100%",textAlign:"left",padding:`${r.paddingXS}px 0`,height:"auto"},children:e.jsxs(_,{justify:"space-between",align:"center",style:{width:"100%"},children:[e.jsxs(j,{children:[xe(c,r),e.jsx(X,{strong:!0,children:c.name})]}),e.jsx(X,{type:"secondary",ellipsis:{tooltip:c.path},style:{fontSize:12,maxWidth:"55%",textAlign:"right"},children:c.path})]})})})})]}):null},ye=({isValidating:i,result:t,token:s})=>i?e.jsx(ne,{style:{color:s.colorPrimary}}):t?t.is_valid?e.jsx(ce,{style:{color:s.colorSuccess}}):e.jsx(oe,{style:{color:s.colorError}}):null,{Text:K}=B,je=({result:i,token:t})=>{const{t:s}=V();return i?e.jsx("div",{style:{marginTop:t.marginXS},children:i.is_valid?e.jsx(L,{type:"success",message:e.jsxs(j,{children:[e.jsx("span",{children:s("chat.workspace.validWorkspace")}),i.workspace_name&&e.jsxs(K,{type:"secondary",children:["(",i.workspace_name,")"]}),i.file_count!==void 0&&e.jsx(K,{type:"secondary",children:s("chat.workspace.fileCount",{count:i.file_count})})]}),showIcon:!0}):e.jsx(L,{type:"error",message:i.error_message||s("validation.invalidPath"),showIcon:!0})}):null},{Text:we}=B,Se=({value:i="",onChange:t,placeholder:s,disabled:n=!1,allowBrowse:r=!0,showRecentWorkspaces:a=!0,showSuggestions:c=!0,onValidationChange:p,className:w,style:l})=>{const{t:x}=V(),{token:u}=Q.useToken(),b=s??x("chat.workspace.placeholder"),{path:S,validationStatus:k,recentWorkspaces:v,suggestions:y,isLoadingRecent:g,isLoadingSuggestions:f,folderBrowserVisible:E,setFolderBrowserVisible:T,handlePathChange:I,handleBrowseClick:R,handleFolderSelect:A,handleWorkspaceSelect:d}=me({value:i,onChange:t,showRecentWorkspaces:a,showSuggestions:c,onValidationChange:p});return e.jsxs("div",{className:w,style:l,children:[e.jsx(le,{value:S,onChange:m=>I(m.target.value),placeholder:b,disabled:n,size:"middle",style:{width:"100%"},suffix:e.jsx(ye,{isValidating:k.isValidating,result:k.result,token:u}),addonBefore:e.jsxs(j,{children:[e.jsx(C,{}),e.jsx(we,{children:x("chat.workspace.label")})]}),addonAfter:r?e.jsx(P,{"aria-label":x("chat.workspace.browseFolder"),title:x("chat.workspace.browseFolder"),icon:e.jsx(C,{}),onClick:R,disabled:n,type:"text",size:"middle",style:{display:"inline-flex",alignItems:"center"}}):void 0}),e.jsx(je,{result:k.result,token:u}),(a||c)&&e.jsxs(e.Fragment,{children:[e.jsx(de,{style:{margin:"16px 0 12px 0"}}),e.jsx(ge,{show:a,isLoading:g,recentWorkspaces:v,onSelect:d,token:u}),e.jsx(fe,{show:c,isLoading:f,suggestions:y,onSelect:d,token:u})]}),e.jsx(he,{visible:E,onClose:()=>T(!1),onSelect:A})]})},{Title:ke}=B,_e=({open:i,initialPath:t="",loading:s=!1,onSubmit:n,onCancel:r})=>{const{t:a}=V(),{message:c}=O.useApp(),[p,w]=o.useState(t),[l,x]=o.useState(null),[u,b]=o.useState(!1);o.useEffect(()=>{i&&(w(t),x(null))},[i,t]);const S=f=>{w(f)},k=f=>{x(f)},v=async()=>{if(!p.trim()){c.error(a("chat.workspace.errorEnterPath"));return}l&&!l.is_valid?G.confirm({title:a("chat.workspace.invalidTitle"),content:e.jsxs("div",{children:[e.jsx("p",{children:a("chat.workspace.issuesDetected")}),e.jsx("p",{children:l.error_message||a("chat.workspace.invalidTitle")}),e.jsx("p",{children:a("chat.workspace.confirmSaveInvalid")})]}),okText:a("common.saveAnyway"),cancelText:a("common.cancel"),onOk:()=>y()}):y()},y=async()=>{b(!0);try{l!=null&&l.is_valid&&await D.addRecentWorkspace(p.trim(),{workspace_name:l.workspace_name}),n(p.trim())}catch(f){console.error("Failed to save workspace path:",f),c.error(a("chat.workspace.errorSaveFailed"))}finally{b(!1)}},g=!p.trim()||s||u;return e.jsx(G,{open:i,title:e.jsx(j,{children:e.jsx(ke,{level:4,style:{margin:0},children:a("chat.workspace.modalTitle")})}),okText:a("common.save"),cancelText:a("common.cancel"),onOk:v,onCancel:r,okButtonProps:{disabled:g,loading:u||s},width:600,destroyOnClose:!0,children:e.jsxs(j,{direction:"vertical",size:"middle",style:{width:"100%"},children:[e.jsx(L,{message:a("chat.workspace.descriptionTitle"),description:e.jsxs("div",{children:[e.jsx("p",{children:a("chat.workspace.descriptionP1")}),e.jsx("p",{children:a("chat.workspace.descriptionP2")})]}),type:"info",showIcon:!0}),e.jsx(Se,{value:p,onChange:S,onValidationChange:k,placeholder:a("chat.workspace.placeholder"),disabled:u,allowBrowse:!0,showRecentWorkspaces:!0,showSuggestions:!0}),l&&!l.is_valid&&e.jsx(L,{message:a("chat.workspace.checkTitle"),description:l.error_message||a("chat.workspace.checkDescription"),type:"warning",showIcon:!0})]})})};export{_e as default};
@@ -1 +1 @@
1
- import{j as e}from"./vendor-markdown-DrUBuQ-c.js";import{a as i}from"./vendor-i18n-BNURlJ23.js";import{C as R,p as I,E as S,L as w,S as m,q as z,l as D,m as b,B as E,u as X,v as C,t as L}from"./vendor-antd-Dvkx9eba.js";const{Text:y}=b,{useToken:M}=L,F=({visible:a,files:d,searchText:l,loading:x,error:h,onSelect:c,onCancel:f,onChangeWorkspace:g})=>{const{token:s}=M(),[n,u]=i.useState(0),k=i.useRef(null),j=i.useRef(null),o=i.useMemo(()=>{const t=l.trim().toLowerCase();return t?d.filter(r=>r.name.toLowerCase().startsWith(t)):d},[d,l]);return i.useEffect(()=>{u(0)},[l,d]),i.useEffect(()=>{if(!a)return;const t=r=>{a&&(r.key==="ArrowDown"||r.key==="n"&&r.ctrlKey?(r.preventDefault(),u(p=>o.length===0?0:(p+1)%o.length)):r.key==="ArrowUp"||r.key==="p"&&r.ctrlKey?(r.preventDefault(),u(p=>o.length===0?0:(p-1+o.length)%o.length)):r.key==="Enter"||r.key==="Tab"?o[n]&&(r.preventDefault(),c(o[n])):r.key==="Escape"&&(r.preventDefault(),f()))};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}},[a,o,n,c,f]),i.useEffect(()=>{if(!a)return;const t=j.current;t&&t.scrollIntoView({block:"nearest"})},[n,a]),a?e.jsx("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,zIndex:1e3,marginBottom:s.marginXS},children:e.jsx(R,{size:"small",style:{borderRadius:s.borderRadius,border:`1px solid ${s.colorBorderSecondary}`,boxShadow:s.boxShadowSecondary},styles:{body:{padding:s.paddingXS,maxHeight:240,overflowY:"auto"}},title:e.jsxs(m,{align:"center",size:s.marginXS,children:[e.jsx(y,{strong:!0,children:"@ File Reference"}),x&&e.jsx(C,{size:"small"})]}),extra:e.jsxs(m,{size:s.marginXS,children:[g&&e.jsx(E,{type:"text",size:"small",icon:e.jsx(X,{}),onClick:g,children:"Set Workspace"}),e.jsx(E,{type:"text",size:"small",onClick:f,children:"Close"})]}),children:h?e.jsx(I,{type:"error",message:h,showIcon:!0}):o.length===0&&!x?e.jsx(S,{image:S.PRESENTED_IMAGE_SIMPLE,description:l?"No matching files found":"Directory is empty"}):e.jsx("div",{ref:k,children:e.jsx(w,{dataSource:o,renderItem:(t,r)=>e.jsx(w.Item,{onMouseEnter:()=>u(r),onClick:()=>c(t),ref:r===n?j:void 0,style:{cursor:"pointer",backgroundColor:r===n?s.colorPrimaryBg:"transparent",borderRadius:s.borderRadiusSM,padding:`${s.paddingXXS}px ${s.paddingXS}px`},children:e.jsxs(m,{size:s.marginXS,align:"center",children:[t.is_directory?e.jsx(z,{}):e.jsx(D,{}),e.jsxs("div",{children:[e.jsx(y,{children:t.name}),e.jsx("div",{children:e.jsx(y,{type:"secondary",style:{fontSize:s.fontSizeSM},children:t.is_directory?"Directory":"File"})})]})]})},t.path)})})})}):null};export{F as default};
1
+ import{j as e}from"./vendor-markdown-yOmFo5hK.js";import{a as i}from"./vendor-i18n-BNURlJ23.js";import{C as R,p as I,E as S,L as w,S as m,q as z,l as D,m as b,B as E,u as X,v as C,t as L}from"./vendor-antd-BpW-8RO2.js";const{Text:y}=b,{useToken:M}=L,F=({visible:a,files:d,searchText:l,loading:x,error:h,onSelect:c,onCancel:f,onChangeWorkspace:g})=>{const{token:s}=M(),[n,u]=i.useState(0),k=i.useRef(null),j=i.useRef(null),o=i.useMemo(()=>{const t=l.trim().toLowerCase();return t?d.filter(r=>r.name.toLowerCase().startsWith(t)):d},[d,l]);return i.useEffect(()=>{u(0)},[l,d]),i.useEffect(()=>{if(!a)return;const t=r=>{a&&(r.key==="ArrowDown"||r.key==="n"&&r.ctrlKey?(r.preventDefault(),u(p=>o.length===0?0:(p+1)%o.length)):r.key==="ArrowUp"||r.key==="p"&&r.ctrlKey?(r.preventDefault(),u(p=>o.length===0?0:(p-1+o.length)%o.length)):r.key==="Enter"||r.key==="Tab"?o[n]&&(r.preventDefault(),c(o[n])):r.key==="Escape"&&(r.preventDefault(),f()))};return window.addEventListener("keydown",t),()=>{window.removeEventListener("keydown",t)}},[a,o,n,c,f]),i.useEffect(()=>{if(!a)return;const t=j.current;t&&t.scrollIntoView({block:"nearest"})},[n,a]),a?e.jsx("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,zIndex:1e3,marginBottom:s.marginXS},children:e.jsx(R,{size:"small",style:{borderRadius:s.borderRadius,border:`1px solid ${s.colorBorderSecondary}`,boxShadow:s.boxShadowSecondary},styles:{body:{padding:s.paddingXS,maxHeight:240,overflowY:"auto"}},title:e.jsxs(m,{align:"center",size:s.marginXS,children:[e.jsx(y,{strong:!0,children:"@ File Reference"}),x&&e.jsx(C,{size:"small"})]}),extra:e.jsxs(m,{size:s.marginXS,children:[g&&e.jsx(E,{type:"text",size:"small",icon:e.jsx(X,{}),onClick:g,children:"Set Workspace"}),e.jsx(E,{type:"text",size:"small",onClick:f,children:"Close"})]}),children:h?e.jsx(I,{type:"error",message:h,showIcon:!0}):o.length===0&&!x?e.jsx(S,{image:S.PRESENTED_IMAGE_SIMPLE,description:l?"No matching files found":"Directory is empty"}):e.jsx("div",{ref:k,children:e.jsx(w,{dataSource:o,renderItem:(t,r)=>e.jsx(w.Item,{onMouseEnter:()=>u(r),onClick:()=>c(t),ref:r===n?j:void 0,style:{cursor:"pointer",backgroundColor:r===n?s.colorPrimaryBg:"transparent",borderRadius:s.borderRadiusSM,padding:`${s.paddingXXS}px ${s.paddingXS}px`},children:e.jsxs(m,{size:s.marginXS,align:"center",children:[t.is_directory?e.jsx(z,{}):e.jsx(D,{}),e.jsxs("div",{children:[e.jsx(y,{children:t.name}),e.jsx("div",{children:e.jsx(y,{type:"secondary",style:{fontSize:s.fontSizeSM},children:t.is_directory?"Directory":"File"})})]})]})},t.path)})})})}):null};export{F as default};
@@ -1 +1 @@
1
- import{j as n}from"./vendor-markdown-DrUBuQ-c.js";import{S as s,l,m as d,n as c,T as p,B as x,o as m,t as u}from"./vendor-antd-Dvkx9eba.js";import"./vendor-i18n-BNURlJ23.js";const{Text:g}=d,{useToken:h}=u,w=({files:o,onRemove:i,onClear:r})=>{const{token:e}=h();return o.length===0?null:n.jsx("div",{style:{marginBottom:e.marginSM,padding:`${e.paddingXXS}px ${e.paddingXS}px`,borderRadius:999,background:e.colorFillSecondary,border:`1px solid ${e.colorBorderSecondary}`},children:n.jsxs(s,{align:"center",size:e.marginXS,style:{width:"100%",justifyContent:"space-between"},children:[n.jsxs(s,{align:"center",wrap:!0,size:e.marginXS,children:[n.jsx(l,{style:{color:e.colorTextSecondary}}),n.jsxs(g,{type:"secondary",style:{fontSize:e.fontSizeSM},children:[o.length," file",o.length>1?"s":""]}),o.map(t=>n.jsx(c,{title:`${t.type||"unknown"} • ${(t.size/1024).toFixed(1)} KB`,children:n.jsx(p,{closable:!0,onClose:a=>{a.preventDefault(),i(t.id)},style:{borderRadius:999,marginInlineEnd:0,maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.name})},t.id))]}),r?n.jsx(x,{type:"text",size:"small",icon:n.jsx(m,{}),onClick:r,style:{borderRadius:999},children:"Clear"}):null]})})};export{w as default};
1
+ import{j as n}from"./vendor-markdown-yOmFo5hK.js";import{S as s,l,m as d,n as c,T as p,B as x,o as m,t as u}from"./vendor-antd-BpW-8RO2.js";import"./vendor-i18n-BNURlJ23.js";const{Text:g}=d,{useToken:h}=u,w=({files:o,onRemove:i,onClear:r})=>{const{token:e}=h();return o.length===0?null:n.jsx("div",{style:{marginBottom:e.marginSM,padding:`${e.paddingXXS}px ${e.paddingXS}px`,borderRadius:999,background:e.colorFillSecondary,border:`1px solid ${e.colorBorderSecondary}`},children:n.jsxs(s,{align:"center",size:e.marginXS,style:{width:"100%",justifyContent:"space-between"},children:[n.jsxs(s,{align:"center",wrap:!0,size:e.marginXS,children:[n.jsx(l,{style:{color:e.colorTextSecondary}}),n.jsxs(g,{type:"secondary",style:{fontSize:e.fontSizeSM},children:[o.length," file",o.length>1?"s":""]}),o.map(t=>n.jsx(c,{title:`${t.type||"unknown"} • ${(t.size/1024).toFixed(1)} KB`,children:n.jsx(p,{closable:!0,onClose:a=>{a.preventDefault(),i(t.id)},style:{borderRadius:999,marginInlineEnd:0,maxWidth:220,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.name})},t.id))]}),r?n.jsx(x,{type:"text",size:"small",icon:n.jsx(m,{}),onClick:r,style:{borderRadius:999},children:"Clear"}):null]})})};export{w as default};
@@ -1 +1 @@
1
- import{j as s}from"./vendor-markdown-DrUBuQ-c.js";import{C as $,d as v,p as T}from"./App-DCXI8jTD.js";import{a as l,u as B}from"./vendor-i18n-BNURlJ23.js";import{v as E,t as M,T as L,w as D,x as K,q as F}from"./vendor-antd-Dvkx9eba.js";import"./main-BgGBpmTu.js";import"./vendor-charts-DHCOhRb3.js";import"./vendor-mermaid-BAz0MwVj.js";const z=({visible:p,searchText:k,onSelect:j,onCancel:f,onAutoComplete:g})=>{const[o,i]=l.useState([]),[c,R]=l.useState([]),[d,u]=l.useState(0),[N,I]=l.useState(!1),S=l.useRef(null),h=l.useRef(null);l.useEffect(()=>{if(!p)return;const a=$.getInstance();(async()=>{I(!0);try{const r=await a.listCommands();v("[CommandSelector]","[CommandSelector] Fetched commands:",r),i(r),u(0)}catch(r){console.error("[CommandSelector] Failed to fetch commands:",r),i([])}finally{I(!1)}})()},[p]),l.useEffect(()=>{const a=o.filter(e=>{var x,y,b,C,w;const r=k.toLowerCase(),n=(e.displayName??"").toLowerCase();return e.name.toLowerCase().includes(r)||n.includes(r)||e.description.toLowerCase().includes(r)||e.type==="mcp"&&[(x=e.metadata)==null?void 0:x.serverId,(y=e.metadata)==null?void 0:y.serverName,(b=e.metadata)==null?void 0:b.originalName].filter(m=>typeof m=="string").some(m=>m.toLowerCase().includes(r))||(((C=e.category)==null?void 0:C.toLowerCase().includes(r))??!1)||(((w=e.tags)==null?void 0:w.some(m=>m.toLowerCase().includes(r)))??!1)});R(a),u(0)},[o,k]),l.useEffect(()=>{if(!h.current||!S.current)return;const a=S.current,e=h.current,r=a.getBoundingClientRect(),n=e.getBoundingClientRect();n.top<r.top?e.scrollIntoView({block:"start",behavior:"smooth"}):n.bottom>r.bottom&&e.scrollIntoView({block:"end",behavior:"smooth"})},[d,c]);const t=l.useCallback(async a=>{try{j({name:a.name,type:a.type,id:a.id})}catch(e){console.error(`[CommandSelector] Failed to select command '${a.name}':`,e)}},[j]);return l.useEffect(()=>{const a=e=>{if(p)switch(e.key){case"ArrowDown":case"n":if(e.key==="n"&&!e.ctrlKey)break;e.preventDefault(),e.stopPropagation(),u(r=>r<c.length-1?r+1:0);break;case"ArrowUp":case"p":if(e.key==="p"&&!e.ctrlKey)break;e.preventDefault(),e.stopPropagation(),u(r=>r>0?r-1:c.length-1);break;case"Enter":e.preventDefault(),e.stopPropagation(),c[d]&&t(c[d]);break;case" ":case"Tab":e.preventDefault(),e.stopPropagation(),c[d]&&g&&g(c[d].name);break;case"Escape":e.preventDefault(),e.stopPropagation(),f();break}};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[p,c,d,f,g,t]),{containerRef:S,selectedItemRef:h,filteredCommands:c,selectedIndex:d,setSelectedIndex:u,isLoading:N,handleCommandSelect:t}},{useToken:X}=M,P={workflow:{color:"blue",icon:s.jsx(F,{}),labelKey:"chat.commandSelector.types.workflow"},skill:{color:"green",icon:s.jsx(K,{}),labelKey:"chat.commandSelector.types.skill"},mcp:{color:"purple",icon:s.jsx(D,{}),labelKey:"chat.commandSelector.types.mcp"}},U=({visible:p,onSelect:k,onCancel:j,searchText:f,onAutoComplete:g})=>{const{token:o}=X(),{t:i}=B(),{containerRef:c,selectedItemRef:R,filteredCommands:d,selectedIndex:u,setSelectedIndex:N,isLoading:I,handleCommandSelect:S}=z({visible:p,searchText:f,onSelect:k,onCancel:j,onAutoComplete:g});if(!p)return null;if(I)return s.jsxs("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary,padding:`${o.paddingSM}px ${o.paddingMD}px`,zIndex:1e3,marginBottom:o.marginXS,textAlign:"center"},children:[s.jsx(E,{size:"small"})," ",i("chat.commandSelector.loading")]});if(d.length===0)return s.jsx("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary,padding:`${o.paddingSM}px ${o.paddingMD}px`,zIndex:1e3,marginBottom:o.marginXS,textAlign:"center",color:o.colorTextSecondary},children:f?i("chat.commandSelector.emptyWithSearch",{search:f}):i("chat.commandSelector.empty")});const h=(t,a)=>{var b,C,w;const e=P[t.type],r=a===u,n=t.type==="mcp"?T(t.name):null,x=t.type==="mcp"?((b=t.metadata)==null?void 0:b.originalName)||(n==null?void 0:n.toolName)||t.displayName||t.name:null,y=t.type==="mcp"&&(((C=t.metadata)==null?void 0:C.serverName)||((w=t.metadata)==null?void 0:w.serverId)||(n==null?void 0:n.serverId))||null;return s.jsxs("div",{ref:r?R:null,className:`command-selector-item ${r?"selected":""}`,onClick:()=>S(t),onMouseEnter:()=>N(a),children:[s.jsxs("div",{className:"command-selector-item-header",children:[s.jsxs("div",{className:"command-selector-item-name",style:{color:o.colorPrimary},children:["/",t.type==="mcp"&&x?x:t.name]}),s.jsxs("div",{style:{display:"flex",gap:o.marginXS},children:[t.type==="mcp"&&y&&s.jsx(L,{color:"processing",children:y}),s.jsxs(L,{color:e.color,children:[e.icon," ",i(e.labelKey)]})]})]}),s.jsx("div",{className:"command-selector-item-description",style:{color:o.colorTextSecondary},children:t.description}),t.type==="mcp"&&y&&s.jsxs("div",{className:"command-selector-item-category",style:{color:o.colorTextTertiary},children:[i("common.server")," ",y]}),t.category&&s.jsxs("div",{className:"command-selector-item-category",style:{color:o.colorTextTertiary},children:[i("common.category")," ",t.category]}),t.tags&&t.tags.length>0&&s.jsx("div",{className:"command-selector-item-tags",children:t.tags.slice(0,3).map(m=>s.jsx(L,{children:m},m))})]},t.id)};return s.jsxs("div",{ref:c,className:"command-selector-container",style:{background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary},children:[s.jsx("div",{style:{padding:`${o.paddingXXS}px ${o.paddingSM}px`,borderBottom:`1px solid ${o.colorBorderSecondary}`,background:o.colorFillQuaternary,fontSize:o.fontSizeSM,color:o.colorTextTertiary},children:i("chat.commandSelector.navigationHint")}),d.map((t,a)=>h(t,a))]})};export{U as default};
1
+ import{j as s}from"./vendor-markdown-yOmFo5hK.js";import{C as $,d as v,p as T}from"./App-CIBUzKFV.js";import{a as l,u as B}from"./vendor-i18n-BNURlJ23.js";import{v as E,t as M,T as L,w as D,x as K,q as F}from"./vendor-antd-BpW-8RO2.js";import"./main-_fs1sZGu.js";import"./vendor-charts-fIPNnfk-.js";import"./vendor-mermaid-DA4JIJaA.js";const z=({visible:p,searchText:k,onSelect:j,onCancel:f,onAutoComplete:g})=>{const[o,i]=l.useState([]),[c,R]=l.useState([]),[d,u]=l.useState(0),[N,I]=l.useState(!1),S=l.useRef(null),h=l.useRef(null);l.useEffect(()=>{if(!p)return;const a=$.getInstance();(async()=>{I(!0);try{const r=await a.listCommands();v("[CommandSelector]","[CommandSelector] Fetched commands:",r),i(r),u(0)}catch(r){console.error("[CommandSelector] Failed to fetch commands:",r),i([])}finally{I(!1)}})()},[p]),l.useEffect(()=>{const a=o.filter(e=>{var x,y,b,C,w;const r=k.toLowerCase(),n=(e.displayName??"").toLowerCase();return e.name.toLowerCase().includes(r)||n.includes(r)||e.description.toLowerCase().includes(r)||e.type==="mcp"&&[(x=e.metadata)==null?void 0:x.serverId,(y=e.metadata)==null?void 0:y.serverName,(b=e.metadata)==null?void 0:b.originalName].filter(m=>typeof m=="string").some(m=>m.toLowerCase().includes(r))||(((C=e.category)==null?void 0:C.toLowerCase().includes(r))??!1)||(((w=e.tags)==null?void 0:w.some(m=>m.toLowerCase().includes(r)))??!1)});R(a),u(0)},[o,k]),l.useEffect(()=>{if(!h.current||!S.current)return;const a=S.current,e=h.current,r=a.getBoundingClientRect(),n=e.getBoundingClientRect();n.top<r.top?e.scrollIntoView({block:"start",behavior:"smooth"}):n.bottom>r.bottom&&e.scrollIntoView({block:"end",behavior:"smooth"})},[d,c]);const t=l.useCallback(async a=>{try{j({name:a.name,type:a.type,id:a.id})}catch(e){console.error(`[CommandSelector] Failed to select command '${a.name}':`,e)}},[j]);return l.useEffect(()=>{const a=e=>{if(p)switch(e.key){case"ArrowDown":case"n":if(e.key==="n"&&!e.ctrlKey)break;e.preventDefault(),e.stopPropagation(),u(r=>r<c.length-1?r+1:0);break;case"ArrowUp":case"p":if(e.key==="p"&&!e.ctrlKey)break;e.preventDefault(),e.stopPropagation(),u(r=>r>0?r-1:c.length-1);break;case"Enter":e.preventDefault(),e.stopPropagation(),c[d]&&t(c[d]);break;case" ":case"Tab":e.preventDefault(),e.stopPropagation(),c[d]&&g&&g(c[d].name);break;case"Escape":e.preventDefault(),e.stopPropagation(),f();break}};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[p,c,d,f,g,t]),{containerRef:S,selectedItemRef:h,filteredCommands:c,selectedIndex:d,setSelectedIndex:u,isLoading:N,handleCommandSelect:t}},{useToken:X}=M,P={workflow:{color:"blue",icon:s.jsx(F,{}),labelKey:"chat.commandSelector.types.workflow"},skill:{color:"green",icon:s.jsx(K,{}),labelKey:"chat.commandSelector.types.skill"},mcp:{color:"purple",icon:s.jsx(D,{}),labelKey:"chat.commandSelector.types.mcp"}},U=({visible:p,onSelect:k,onCancel:j,searchText:f,onAutoComplete:g})=>{const{token:o}=X(),{t:i}=B(),{containerRef:c,selectedItemRef:R,filteredCommands:d,selectedIndex:u,setSelectedIndex:N,isLoading:I,handleCommandSelect:S}=z({visible:p,searchText:f,onSelect:k,onCancel:j,onAutoComplete:g});if(!p)return null;if(I)return s.jsxs("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary,padding:`${o.paddingSM}px ${o.paddingMD}px`,zIndex:1e3,marginBottom:o.marginXS,textAlign:"center"},children:[s.jsx(E,{size:"small"})," ",i("chat.commandSelector.loading")]});if(d.length===0)return s.jsx("div",{style:{position:"absolute",bottom:"100%",left:0,right:0,background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary,padding:`${o.paddingSM}px ${o.paddingMD}px`,zIndex:1e3,marginBottom:o.marginXS,textAlign:"center",color:o.colorTextSecondary},children:f?i("chat.commandSelector.emptyWithSearch",{search:f}):i("chat.commandSelector.empty")});const h=(t,a)=>{var b,C,w;const e=P[t.type],r=a===u,n=t.type==="mcp"?T(t.name):null,x=t.type==="mcp"?((b=t.metadata)==null?void 0:b.originalName)||(n==null?void 0:n.toolName)||t.displayName||t.name:null,y=t.type==="mcp"&&(((C=t.metadata)==null?void 0:C.serverName)||((w=t.metadata)==null?void 0:w.serverId)||(n==null?void 0:n.serverId))||null;return s.jsxs("div",{ref:r?R:null,className:`command-selector-item ${r?"selected":""}`,onClick:()=>S(t),onMouseEnter:()=>N(a),children:[s.jsxs("div",{className:"command-selector-item-header",children:[s.jsxs("div",{className:"command-selector-item-name",style:{color:o.colorPrimary},children:["/",t.type==="mcp"&&x?x:t.name]}),s.jsxs("div",{style:{display:"flex",gap:o.marginXS},children:[t.type==="mcp"&&y&&s.jsx(L,{color:"processing",children:y}),s.jsxs(L,{color:e.color,children:[e.icon," ",i(e.labelKey)]})]})]}),s.jsx("div",{className:"command-selector-item-description",style:{color:o.colorTextSecondary},children:t.description}),t.type==="mcp"&&y&&s.jsxs("div",{className:"command-selector-item-category",style:{color:o.colorTextTertiary},children:[i("common.server")," ",y]}),t.category&&s.jsxs("div",{className:"command-selector-item-category",style:{color:o.colorTextTertiary},children:[i("common.category")," ",t.category]}),t.tags&&t.tags.length>0&&s.jsx("div",{className:"command-selector-item-tags",children:t.tags.slice(0,3).map(m=>s.jsx(L,{children:m},m))})]},t.id)};return s.jsxs("div",{ref:c,className:"command-selector-container",style:{background:o.colorBgContainer,border:`1px solid ${o.colorBorderSecondary}`,borderRadius:o.borderRadiusSM,boxShadow:o.boxShadowSecondary},children:[s.jsx("div",{style:{padding:`${o.paddingXXS}px ${o.paddingSM}px`,borderBottom:`1px solid ${o.colorBorderSecondary}`,background:o.colorFillQuaternary,fontSize:o.fontSizeSM,color:o.colorTextTertiary},children:i("chat.commandSelector.navigationHint")}),d.map((t,a)=>h(t,a))]})};export{U as default};