@juki-team/base-ui 1.5.11 → 1.5.13

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 (123) hide show
  1. package/dist/esm/ArrowForwardIcon-DelUFdaJ.js +1 -0
  2. package/dist/esm/{BarChart-D6_BRhr2.js → BarChart-D2X8Qu4u.js} +1 -1
  3. package/dist/esm/{CartesianChart-CWujTVm7.js → CartesianChart-DYpkf6Ou.js} +1 -1
  4. package/dist/esm/{ChangePasswordModal-Ds3TqD5C.js → ChangePasswordModal-yc4D7RMs.js} +1 -1
  5. package/dist/esm/{CodeEditor-CTnPGIiF.js → CodeEditor-Dxp5QnTB.js} +1 -1
  6. package/dist/esm/{CodeViewer-DKaZetL7.js → CodeViewer-BSZXIngC.js} +1 -1
  7. package/dist/esm/{Collapse-cx1sfcdL.js → Collapse-D-w5SKss.js} +1 -1
  8. package/dist/esm/{DataGrid-bZJxnNpn.js → DataGrid-BdFgb8IP.js} +1 -1
  9. package/dist/esm/DataViewer-DVVGkDSK.js +1 -0
  10. package/dist/esm/{DrawerView-uqDkkfN3.js → DrawerView-DCRvckZd.js} +1 -1
  11. package/dist/esm/{ExcalidrawButton-DP7IRqig.js → ExcalidrawButton-_a-eNbyb.js} +1 -1
  12. package/dist/esm/{GraphvizViewer-BGX2Z8KP.js → GraphvizViewer-B2-JVx0t.js} +1 -1
  13. package/dist/esm/{ImageLoaderCropper-BfIfmEdE.js → ImageLoaderCropper-wV-hPOjq.js} +1 -1
  14. package/dist/esm/{InputCellPhoneNumber-qovO8IT4.js → InputCellPhoneNumber-Bcl22QsC.js} +1 -1
  15. package/dist/esm/{InputColor-8DJM_wZR.js → InputColor-CHgGjI3f.js} +1 -1
  16. package/dist/esm/{LineChart-vXWysFNq.js → LineChart-ByKPkVhP.js} +1 -1
  17. package/dist/esm/{LoaderLayer-Cv80UCdL.js → LoaderLayer-ECtsj85k.js} +1 -1
  18. package/dist/esm/{MdMath-D4p_cWv8.js → MdMath-DljkRDxR.js} +1 -1
  19. package/dist/esm/{MdMathEditor-BC4QqqY5.js → MdMathEditor-Dvq5oODw.js} +1 -1
  20. package/dist/esm/{Popover-KQx_QYJY.js → Popover-CX8YffOd.js} +1 -1
  21. package/dist/esm/ReplyIcon-BNYBKbgb.js +1 -0
  22. package/dist/esm/{SettingsIcon-C3sN1TNw.js → SettingsIcon-B9nmP4lD.js} +1 -1
  23. package/dist/esm/{SlideDeck-BP-CNUhS.js → SlideDeck-C0n93gz0.js} +1 -1
  24. package/dist/esm/{TableEyeIcon-BFfTLgKU.js → TableEyeIcon-Mb5aFvN0.js} +1 -1
  25. package/dist/esm/{TableOfContents-Cg9pymLO.js → TableOfContents-BBAEZx6Z.js} +1 -1
  26. package/dist/esm/{Tooltip-k62JJg5n.js → Tooltip-DB0S1ErV.js} +1 -1
  27. package/dist/esm/{UserCodeEditor-LaT3CJvU.js → UserCodeEditor-B1d5gyVE.js} +2 -2
  28. package/dist/esm/{VirtualizedRowsFixed-CN-1w7u1.js → VirtualizedRowsFixed-ChX4ON0l.js} +1 -1
  29. package/dist/esm/{WorksheetAsSlides-DmGLDXtL.js → WorksheetAsSlides-CpiXbUML.js} +1 -1
  30. package/dist/esm/{WorksheetBodies-BYISk5yC.js → WorksheetBodies-CO67-rEz.js} +1 -1
  31. package/dist/esm/{WorksheetContents-IzJ6Cw_g.js → WorksheetContents-ClZpiXB-.js} +1 -1
  32. package/dist/esm/{WorksheetEditor-Dacb3EOk.js → WorksheetEditor-CjAvgOx6.js} +1 -1
  33. package/dist/esm/WorksheetNode-BgNNzY8I.js +1 -0
  34. package/dist/esm/{WorksheetViewer-BLFZouvt.js → WorksheetViewer-DVQitUzi.js} +1 -1
  35. package/dist/esm/{abnfDiagram-WEYOIA3C-BEp-BJ00.js → abnfDiagram-WEYOIA3C-CwJ1V2U1.js} +1 -1
  36. package/dist/esm/{arc-B4ps4Bee.js → arc-COK0VEkT.js} +1 -1
  37. package/dist/esm/{architectureDiagram-ZHVYKT53-BDbBQNmT.js → architectureDiagram-ZHVYKT53-CM6AQFKG.js} +1 -1
  38. package/dist/esm/{blockDiagram-RJAE7QA3-CYciK31K.js → blockDiagram-RJAE7QA3-CdSNo9Pe.js} +1 -1
  39. package/dist/esm/{c4Diagram-XDPPPE54-dye_nDtJ.js → c4Diagram-XDPPPE54-BhfYKASq.js} +1 -1
  40. package/dist/esm/channel-DWjyymG_.js +1 -0
  41. package/dist/esm/{chunk-2E7WHVMD-fBpaf8Ph.js → chunk-2E7WHVMD-CVBqw5fR.js} +1 -1
  42. package/dist/esm/{chunk-2Q5K7J3B-B1dv6ovr.js → chunk-2Q5K7J3B-CyZYeWxE.js} +1 -1
  43. package/dist/esm/{chunk-4EMNKR2T-B10soxeX.js → chunk-4EMNKR2T-D1yHHif8.js} +1 -1
  44. package/dist/esm/{chunk-55XCU76K-BhN5PLeC.js → chunk-55XCU76K-CvYWAV_o.js} +1 -1
  45. package/dist/esm/{chunk-5VM5RSS4-DEKr6tsK.js → chunk-5VM5RSS4-CS0kZLYA.js} +1 -1
  46. package/dist/esm/{chunk-JWPE2WC7-lyHCgozd.js → chunk-JWPE2WC7-Ct5OBLCL.js} +1 -1
  47. package/dist/esm/{chunk-NQOKRVIF-CLuzP2Xi.js → chunk-NQOKRVIF-D0-2mmH4.js} +1 -1
  48. package/dist/esm/{chunk-VQ5W62QI-MGNBKNlF.js → chunk-VQ5W62QI-CsGo0PTx.js} +1 -1
  49. package/dist/esm/{chunk-XXDRQBXY-CIB-Pv6R.js → chunk-XXDRQBXY-DPPGTM3w.js} +1 -1
  50. package/dist/esm/{chunk-ZCHMQSOR--e_zi_XA.js → chunk-ZCHMQSOR-Bvjutmxm.js} +1 -1
  51. package/dist/esm/{classDiagram-v2-4MYWR3UA-BU3oZLY5.js → classDiagram-v2-4MYWR3UA-J_cOAAHS.js} +1 -1
  52. package/dist/esm/{commons-BHuDJzTw.js → commons-iref2pEJ.js} +1 -1
  53. package/dist/esm/constants.js +1 -1
  54. package/dist/esm/{cose-bilkent-JH36ORCC-DdSzxxt0.js → cose-bilkent-JH36ORCC-BHzp2aV0.js} +1 -1
  55. package/dist/esm/{cynefinDiagram-WF24UDRP-BbPVqiW_.js → cynefinDiagram-WF24UDRP-B3Y9mCh3.js} +1 -1
  56. package/dist/esm/{dagre-NK4GIZVX-DLhklBxm.js → dagre-NK4GIZVX-BSfh-C_i.js} +1 -1
  57. package/dist/esm/{diagram-CBK3MWTC-C2Pa6CcJ.js → diagram-CBK3MWTC-w-BT1S7I.js} +1 -1
  58. package/dist/esm/{diagram-I5XIIV2D-D-qVVyv1.js → diagram-I5XIIV2D-wMqo87b_.js} +1 -1
  59. package/dist/esm/{diagram-ODIL2UCW-QFqiGLCP.js → diagram-ODIL2UCW-DQhUXqDu.js} +1 -1
  60. package/dist/esm/{diagram-PFBEJUXE-UHmEOsHi.js → diagram-PFBEJUXE-BlCntZMJ.js} +1 -1
  61. package/dist/esm/{diagram-RJA3I4VV-CcSCqRS4.js → diagram-RJA3I4VV-Cev21A9i.js} +1 -1
  62. package/dist/esm/{diagram-TYUNFSNR-DcSxaQx8.js → diagram-TYUNFSNR-BiiLNoPs.js} +1 -1
  63. package/dist/esm/{ebnfDiagram-V4P3TTPT-DRA2NTIs.js → ebnfDiagram-V4P3TTPT-BWNnHl88.js} +1 -1
  64. package/dist/esm/{elk-QONTBCTQ-Bkv5Sf8G.js → elk-QONTBCTQ-DhvgoeNg.js} +1 -1
  65. package/dist/esm/{erDiagram-KYQIGQAA-Blb_MksM.js → erDiagram-KYQIGQAA-DkFGw08p.js} +1 -1
  66. package/dist/esm/flowDiagram-IUGLLWBU-B-Bxdnen.js +1 -0
  67. package/dist/esm/{ganttDiagram-R7GPNTJY-Do8IYgX5.js → ganttDiagram-R7GPNTJY-Bvr90Acy.js} +1 -1
  68. package/dist/esm/{gitGraphDiagram-PDYL7XHY-CAvv6VXj.js → gitGraphDiagram-PDYL7XHY-DHszoB7b.js} +1 -1
  69. package/dist/esm/helpers.js +1 -1
  70. package/dist/esm/{index-_kF3_0-k.js → index-2PTQqTnK.js} +1 -1
  71. package/dist/esm/{index-JPCp_Z3V.js → index-70SVfF-m.js} +1 -1
  72. package/dist/esm/{index-Dz8ISdDG.js → index-B5Soolr4.js} +1 -1
  73. package/dist/esm/index-BpcqEzEG.js +1 -0
  74. package/dist/esm/{index-L4hkrldv.js → index-DkZReaeM.js} +1 -1
  75. package/dist/esm/{infoDiagram-MVDRKAX5-CcsrNbMy.js → infoDiagram-MVDRKAX5-D05SjyVf.js} +1 -1
  76. package/dist/esm/{ishikawaDiagram-HPEHV2GE-BSefVZjI.js → ishikawaDiagram-HPEHV2GE-50RQ8Owd.js} +1 -1
  77. package/dist/esm/{journeyDiagram-BOSHW7O7-C3Y3fTW5.js → journeyDiagram-BOSHW7O7-DnHu8DYt.js} +1 -1
  78. package/dist/esm/{kanban-definition-FNSA4HC5-DqDHeqOc.js → kanban-definition-FNSA4HC5-BF3y0Q5O.js} +1 -1
  79. package/dist/esm/main.js +1 -1
  80. package/dist/esm/{mermaid.core-DKkN0L2R.js → mermaid.core-DRk6tt5W.js} +2 -2
  81. package/dist/esm/{mindmap-definition-6OY57UG3-BaT97m0e.js → mindmap-definition-6OY57UG3-D2VvQCn5.js} +1 -1
  82. package/dist/esm/{pegDiagram-ECIUJNBX-BHWXjV1h.js → pegDiagram-ECIUJNBX-LCa_e2vp.js} +1 -1
  83. package/dist/esm/{pieDiagram-GNMPY74T-tMRQX3HS.js → pieDiagram-GNMPY74T-BFxRc695.js} +1 -1
  84. package/dist/esm/{quadrantDiagram-D57K4MC3-CfbxRwkB.js → quadrantDiagram-D57K4MC3-m-v5Oved.js} +1 -1
  85. package/dist/esm/{railroadDiagram-Y72NRBL7-QMN2Zgh0.js → railroadDiagram-Y72NRBL7-CGhQNkt2.js} +1 -1
  86. package/dist/esm/{requirementDiagram-EQYSW5RA-5SA2oZMo.js → requirementDiagram-EQYSW5RA-D4TUJX2j.js} +1 -1
  87. package/dist/esm/{sankeyDiagram-SY24JHO5-BXdQgEr6.js → sankeyDiagram-SY24JHO5-qeunG13D.js} +1 -1
  88. package/dist/esm/{sequenceDiagram-BLEHNHQU-BvWgv_Hq.js → sequenceDiagram-BLEHNHQU-Bf8dSGiP.js} +1 -1
  89. package/dist/esm/server.js +1 -1
  90. package/dist/esm/settings-CBGV-lz3.js +1 -0
  91. package/dist/esm/settings.js +1 -1
  92. package/dist/esm/{sizeCapture-INFHLROL-CRBg4FIP.js → sizeCapture-INFHLROL-B0tQoQkY.js} +1 -1
  93. package/dist/esm/{stateDiagram-v2-A6IESKWZ-DOTqWcFT.js → stateDiagram-v2-A6IESKWZ-D-bM5qVN.js} +1 -1
  94. package/dist/esm/{swimlanes-B3ENRKFQ-Dt3HxqOR.js → swimlanes-B3ENRKFQ-DR9euVhL.js} +1 -1
  95. package/dist/esm/swimlanesDiagram-AYQRV4AK-D0-BBYnj.js +1 -0
  96. package/dist/esm/{timeline-definition-JXYKGLGB-ChogrVVw.js → timeline-definition-JXYKGLGB-ChsOD2es.js} +1 -1
  97. package/dist/esm/{types-BqWpd51k.js → types-DsZvEANP.js} +1 -1
  98. package/dist/esm/{usecaseDiagram-WPOLBNNX-DAMNLFuf.js → usecaseDiagram-WPOLBNNX-DZFg1Zof.js} +1 -1
  99. package/dist/esm/{vennDiagram-Q3Y3IDCW--qCUcJOu.js → vennDiagram-Q3Y3IDCW-DAW-dDy7.js} +1 -1
  100. package/dist/esm/{wardleyDiagram-IVAIDKWA-D0f1LOLT.js → wardleyDiagram-IVAIDKWA-B-gsebc8.js} +1 -1
  101. package/dist/esm/websocket-CdeP8N_S.js +1 -0
  102. package/dist/esm/{xychartDiagram-4URNHDU4-Bkx4mxlH.js → xychartDiagram-4URNHDU4-DS3Qm0VA.js} +1 -1
  103. package/dist/module-types/src/components/organisms/_layz_/DataViewer/CardList/DataViewerCard.d.ts +6 -2
  104. package/dist/module-types/src/components/organisms/_layz_/DataViewer/CardList/types.d.ts +9 -6
  105. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableHead/index.d.ts +2 -2
  106. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/TableRow.d.ts +21 -0
  107. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/ViewContainerRows.d.ts +0 -2
  108. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/columnLayout.d.ts +23 -0
  109. package/dist/module-types/src/components/organisms/_layz_/DataViewer/RowList/useScrollEdges.d.ts +13 -0
  110. package/dist/module-types/src/components/organisms/_layz_/DataViewer/types.d.ts +12 -8
  111. package/dist/module-types/src/stores/websocket/topicChannels.d.ts +37 -0
  112. package/package.json +2 -2
  113. package/src/styles/components/atoms/_data-viewer.scss +34 -16
  114. package/dist/esm/ArrowForwardIcon-1RdVdC78.js +0 -1
  115. package/dist/esm/DataViewer-DpQqmjva.js +0 -1
  116. package/dist/esm/ReplyIcon-BlBLARCH.js +0 -1
  117. package/dist/esm/WorksheetNode-2B7Rld9L.js +0 -1
  118. package/dist/esm/channel-DdQBbu1U.js +0 -1
  119. package/dist/esm/flowDiagram-IUGLLWBU-CQaJ12bg.js +0 -1
  120. package/dist/esm/index-DTAG4nDF.js +0 -1
  121. package/dist/esm/settings-BONQQsPx.js +0 -1
  122. package/dist/esm/swimlanesDiagram-AYQRV4AK-cNbShXsw.js +0 -1
  123. package/dist/esm/websocket-B2hJys_Q.js +0 -1
@@ -1 +1 @@
1
- import{g as t}from"./chunk-XXDRQBXY-CIB-Pv6R.js";import{s as e}from"./chunk-VQ5W62QI-MGNBKNlF.js";import{_ as s,L as i,b as n,a as r,s as a,g as o,v as c,x as l,c as h,l as u,m as d,C as y,A as p,E as b,F as g,G as _,M as m,I as f,N as k,r as E,t as S,k as T,u as $}from"./mermaid.core-DKkN0L2R.js";import{c as O}from"./channel-DdQBbu1U.js";import"./index-DTAG4nDF.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-BHuDJzTw.js";import"./settings-BONQQsPx.js";import"./constants.js";import"./LoaderLayer-Cv80UCdL.js";import"./websocket-B2hJys_Q.js";import"./index-_kF3_0-k.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";var N=function(){var t=s(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],i=[2,2],n=[1,7],r=[1,9],a=[1,10],o=[1,11],c=[1,12],l=[1,30],h=[1,23],u=[1,24],d=[1,25],y=[1,26],p=[1,27],b=[1,19],g=[1,28],_=[1,29],m=[1,20],f=[1,18],k=[1,21],E=[1,22],S=[2,6],T=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],$=[1,36],O=[1,37],N=[1,38],C=[1,39],x=[1,40],A=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],I=[1,46],R=[1,47],D=[1,57],L=[43,51,53,54,55,74,75],v=[1,70],w=[1,68],M=[1,65],B=[1,69],G=[1,71],F=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],Y=[1,78],j=[1,77],P=[1,76],z=[69,70,71,72,73],U=[1,91],K=[6,9,45,50],Z=[6,9,12,44,45,50,51,52],W=[1,101],Q=[1,100],X=[1,99],q=[18,61],H=[1,110],V=[1,109],J=[20,43,51,53,54,55],tt=[18,61,64,66],et={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",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",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:s(function(t,e,s,i,n,r,a){var o=r.length-1;switch(n){case 1:break;case 2:case 5:case 6:this.$=[];break;case 3:this.$=r[o-1].concat(r[o]);break;case 4:case 34:case 59:case 60:case 61:case 62:case 86:case 69:case 71:case 74:this.$=r[o];break;case 7:i.addEntity(r[o-4]),i.addEntity(r[o-2]),i.addRelationship(r[o-4],r[o],r[o-2],r[o-3]),this.$=[r[o-4],r[o-2]];break;case 8:i.addEntity(r[o-8]),i.addEntity(r[o-4]),i.addRelationship(r[o-8],r[o],r[o-4],r[o-5]),i.setClass([r[o-8]],r[o-6]),i.setClass([r[o-4]],r[o-2]),this.$=[r[o-8],r[o-4]];break;case 9:i.addEntity(r[o-6]),i.addEntity(r[o-2]),i.addRelationship(r[o-6],r[o],r[o-2],r[o-3]),i.setClass([r[o-6]],r[o-4]),this.$=[r[o-6],r[o-2]];break;case 10:i.addEntity(r[o-6]),i.addEntity(r[o-4]),i.addRelationship(r[o-6],r[o],r[o-4],r[o-5]),i.setClass([r[o-4]],r[o-2]),this.$=[r[o-6],r[o-4]];break;case 11:i.addEntity(r[o-3]),i.addAttributes(r[o-3],r[o-1]),this.$=[r[o-3]];break;case 12:i.addEntity(r[o-5]),i.addAttributes(r[o-5],r[o-1]),i.setClass([r[o-5]],r[o-3]),this.$=[r[o-5]];break;case 13:i.addEntity(r[o-2]),this.$=[r[o-2]];break;case 14:i.addEntity(r[o-4]),i.setClass([r[o-4]],r[o-2]),this.$=[r[o-4]];break;case 15:i.addEntity(r[o]),this.$=[r[o]];break;case 16:i.addEntity(r[o-2]),i.setClass([r[o-2]],r[o]),this.$=[r[o-2]];break;case 17:i.addEntity(r[o-6],r[o-4]),i.addAttributes(r[o-6],r[o-1]),this.$=[r[o-6]];break;case 18:i.addEntity(r[o-8],r[o-6]),i.addAttributes(r[o-8],r[o-1]),i.setClass([r[o-8]],r[o-3]),this.$=[r[o-8]];break;case 19:i.addEntity(r[o-5],r[o-3]),this.$=[r[o-5]];break;case 20:i.addEntity(r[o-7],r[o-5]),i.setClass([r[o-7]],r[o-2]),this.$=[r[o-7]];break;case 21:i.addEntity(r[o-3],r[o-1]);break;case 22:i.addEntity(r[o-5],r[o-3]),i.setClass([r[o-5]],r[o]);break;case 23:case 24:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=r[o]:(i.setDirection(r[o].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:r[o-2].id},r[o-1],{text:r[o-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:r[o-1],text:r[o-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:r[o-4],text:r[o-2]};break;case 35:this.$=r[o-1]+" "+r[o];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=r[o-3],i.addClass(r[o-2],r[o-1]);break;case 41:case 42:case 63:case 72:case 47:this.$=[r[o]];break;case 43:case 44:this.$=r[o-2].concat([r[o]]);break;case 45:this.$=r[o-2],i.setClass(r[o-1],r[o]);break;case 46:this.$=r[o-3],i.addCssStyles(r[o-2],r[o-1]);break;case 48:case 73:r[o-2].push(r[o]),this.$=r[o-2];break;case 50:case 70:this.$=r[o-1]+r[o];break;case 58:case 84:case 85:case 75:this.$=r[o].replace(/"/g,"");break;case 64:r[o].push(r[o-1]),this.$=r[o];break;case 65:this.$={type:r[o-1],name:r[o]};break;case 66:this.$={type:r[o-2],name:r[o-1],keys:r[o]};break;case 67:this.$={type:r[o-2],name:r[o-1],comment:r[o]};break;case 68:this.$={type:r[o-3],name:r[o-2],keys:r[o-1],comment:r[o]};break;case 76:this.$={cardA:r[o],relType:r[o-1],cardB:r[o-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,i,{5:3}),{6:[1,4],7:5,8:6,9:n,10:8,21:r,23:a,25:o,27:c,28:13,29:14,30:15,31:16,32:17,34:l,37:h,38:u,39:d,40:y,41:p,43:b,46:g,47:_,51:m,53:f,54:k,55:E},t(e,S,{1:[2,1]}),t(T,[2,3]),t(T,[2,4]),t(T,[2,5]),t(T,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:$,70:O,71:N,72:C,73:x}),{22:[1,41]},{24:[1,42]},{26:[1,43]},t(T,[2,26]),t(T,[2,27]),t(T,[2,28]),t(T,[2,29]),t(T,[2,30]),t(T,i,{5:44}),t(A,[2,58]),t(A,[2,59]),t(A,[2,60]),t(A,[2,61]),t(A,[2,62]),t(T,[2,36]),t(T,[2,37]),t(T,[2,38]),t(T,[2,39]),{15:45,43:I,44:R},{15:48,43:I,44:R},{15:49,43:I,44:R},{10:50,43:b,51:m,53:f,54:k,55:E},{10:51,43:b,51:m,53:f,54:k,55:E},{15:52,43:I,44:R},{17:53,18:[1,54],56:55,57:56,61:D},{10:58,43:b,51:m,53:f,54:k,55:E},{68:59,74:[1,60],75:[1,61]},t(L,[2,77]),t(L,[2,78]),t(L,[2,79]),t(L,[2,80]),t(L,[2,81]),t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),{6:[1,63],7:5,8:6,9:n,10:8,21:r,23:a,25:o,27:c,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:l,37:h,38:u,39:d,40:y,41:p,43:b,46:g,47:_,51:m,53:f,54:k,55:E},{12:v,42:64,44:w,45:M,48:66,49:67,51:B,52:G},t(F,[2,41]),t(F,[2,42]),{15:72,43:I,44:R,45:M},{12:v,42:73,44:w,45:M,48:66,49:67,51:B,52:G},{6:Y,9:j,19:[1,75],35:74,50:P},{12:[1,79],14:[1,80]},t(T,[2,16],{67:35,11:81,16:[1,82],45:M,69:$,70:O,71:N,72:C,73:x}),{18:[1,83]},t(T,[2,13]),{17:84,18:[2,63],56:55,57:56,61:D},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:$,70:O,71:N,72:C,73:x},t(z,[2,82]),t(z,[2,83]),t(T,[2,31]),t(T,S),{6:Y,9:j,35:90,45:U,50:P},{43:[1,92],44:[1,93]},t(K,[2,47],{49:94,12:v,44:w,51:B,52:G}),t(Z,[2,49]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),t(Z,[2,57]),t(T,[2,45],{45:M}),{6:Y,9:j,35:95,45:U,50:P},t(T,[2,32]),{10:97,36:96,43:b,51:m,53:f,54:k,55:E},t(T,[2,51]),t(T,[2,52]),t(T,[2,53]),{13:98,43:W,53:Q,76:X},{15:102,43:I,44:R},{10:103,43:b,51:m,53:f,54:k,55:E},{17:104,18:[1,105],56:55,57:56,61:D},t(T,[2,11]),{18:[2,64]},t(q,[2,65],{59:106,60:107,63:108,65:H,66:V}),t([18,61,65,66],[2,71]),{61:[2,70]},t(T,[2,21],{14:[1,112],16:[1,111]}),t([43,51,53,54,55],[2,76]),t(T,[2,40]),{12:v,44:w,48:113,49:67,51:B,52:G},t(F,[2,43]),t(F,[2,44]),t(Z,[2,50]),t(T,[2,46]),{10:115,20:[1,114],43:b,51:m,53:f,54:k,55:E},t(J,[2,34]),t(T,[2,7]),t(T,[2,84]),t(T,[2,85]),t(T,[2,86]),{12:[1,116],45:M},{12:[1,118],14:[1,117]},{18:[1,119]},t(T,[2,14]),t(q,[2,66],{60:120,64:[1,121],66:V}),t(q,[2,67]),t(tt,[2,72]),t(q,[2,75]),t(tt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:D},{15:124,43:I,44:R},t(K,[2,48],{49:94,12:v,44:w,51:B,52:G}),{6:Y,9:j,35:125,50:P},t(J,[2,35]),{13:126,43:W,53:Q,76:X},{15:127,43:I,44:R},{13:128,43:W,53:Q,76:X},t(T,[2,12]),t(q,[2,68]),{63:129,65:H},{18:[1,130]},t(T,[2,19]),t(T,[2,22],{16:[1,131],45:M}),t(T,[2,33]),t(T,[2,10]),{12:[1,132],45:M},t(T,[2,9]),t(tt,[2,73]),t(T,[2,17]),{17:133,18:[1,134],56:55,57:56,61:D},{13:135,43:W,53:Q,76:X},{18:[1,136]},t(T,[2,20]),t(T,[2,8]),t(T,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:s(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:s(function(t){var e=this,i=[0],n=[],r=[null],a=[],o=this.table,c="",l=0,h=0,u=a.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);d.setInput(t,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var b=d.yylloc;a.push(b);var g=d.options&&d.options.ranges;function _(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,s(function(t){i.length=i.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),s(_,"lex");for(var m,f,k,E,S,T,$,O,N={};;){if(f=i[i.length-1],this.defaultActions[f]?k=this.defaultActions[f]:(null==m&&(m=_()),k=o[f]&&o[f][m]),void 0===k||!k.length||!k[0]){var C="";for(S in O=[],o[f])this.terminals_[S]&&S>2&&O.push("'"+this.terminals_[S]+"'");C=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+O.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:b,expected:O})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+m);switch(k[0]){case 1:i.push(m),r.push(d.yytext),a.push(d.yylloc),i.push(k[1]),m=null,h=d.yyleng,c=d.yytext,l=d.yylineno,b=d.yylloc;break;case 2:if(T=this.productions_[k[1]][1],N.$=r[r.length-T],N._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},g&&(N._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(N,[c,h,l,y.yy,k[1],r,a].concat(u))))return E;T&&(i=i.slice(0,-1*T*2),r=r.slice(0,-1*T),a=a.slice(0,-1*T)),i.push(this.productions_[k[1]][0]),r.push(N.$),a.push(N._$),$=o[i[i.length-2]][i[i.length-1]],i.push($);break;case 3:return!0}}return!0},"parse")},st=function(){return{EOF:1,parseError:s(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:s(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:s(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:s(function(t){this.unput(this.match.slice(t))},"less"),pastInput:s(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:s(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var t=this.next();return t||this.lex()},"lex"),begin:s(function(t){this.conditionStack.push(t)},"begin"),popState:s(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:s(function(t){this.begin(t)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),23;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),25;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 28:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:case 22:case 30:case 37:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;case 17:case 18:case 40:return 52;case 19:case 39:return 45;case 20:return 14;case 21:case 38:return 12;case 23:return 65;case 24:case 25:case 27:return 61;case 26:this.begin("block_bq");break;case 29:return 66;case 31:return this.popState(),18;case 32:case 81:return e.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;case 36:return this.popState(),9;case 41:return this.begin("style"),41;case 42:return 46;case 43:return 34;case 44:return 33;case 45:case 49:case 50:case 68:return 69;case 46:case 47:case 48:case 56:case 58:case 70:return 71;case 51:case 52:case 53:case 54:case 55:case 57:case 69:return 70;case 59:case 60:case 62:case 63:case 64:case 67:return 72;case 61:return 54;case 65:return 55;case 66:return 51;case 71:return 73;case 72:case 75:case 76:case 77:return 74;case 73:case 74:return 75;case 78:return 44;case 79:return 50;case 80:return 43;case 82:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}}}();function it(){this.yy={}}return et.lexer=st,s(it,"Parser"),it.prototype=et,et.Parser=it,new it}();N.parser=N;var C=N,x=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=n,this.getAccTitle=r,this.setAccDescription=a,this.getAccDescription=o,this.setDiagramTitle=c,this.getDiagramTitle=l,this.getConfig=s(()=>h().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{s(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,u.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:h().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),u.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){const s=this.addEntity(t);let i;for(i=e.length-1;i>=0;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),s.attributes.push(e[i]),u.debug("Added attribute ",e[i].name)}addRelationship(t,e,s,i){let n,r;if(this.subGraphLookup.has(t))n=t;else{const e=this.addEntity(t);if(!e)return;n=e.id}if(this.subGraphLookup.has(s))r=s;else{const t=this.addEntity(s);if(!t)return;r=t.id}const a={entityA:n,roleA:e,entityB:r,relSpec:i};this.relationships.push(a),u.debug("Added new relationship :",a)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(const s of t){const t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}addCssStyles(t,e){for(const s of t){const t=this.entities.get(s),i=this.subGraphLookup.get(s);if(e){if(t)for(const s of e)t.cssStyles.push(s);if(i){i.cssStyles||(i.cssStyles=[]);for(const t of e)i.cssStyles.push(t)}}}}addClass(t,e){t.forEach(t=>{let s=this.classes.get(t);void 0===s&&(s={id:t,styles:[],textStyles:[]},this.classes.set(t,s)),e&&e.forEach(function(t){if(/color/.exec(t)){const e=t.replace("fill","bgFill");s.textStyles.push(e)}s.styles.push(t)})})}addSubGraph(t,e,i){let n=t.text.trim(),r=i.text;const a=s(t=>{const e=new Set;let s;return{nodeList:t.filter(t=>{if(t?.stmt)return"dir"===t.stmt&&(s=t.value),!1;if("string"!=typeof t)return!1;const i=t.trim();return!!i&&(!e.has(i)&&(e.add(i),!0))}),dir:s}},"uniq")(e.flat()),o=a.nodeList,c=a.dir;n=n??"subGraph"+this.subCount,r=r||"",r=this.sanitizeText(r),this.subCount=this.subCount+1;const l={id:n,nodes:o,title:r.trim(),classes:[],cssStyles:[],dir:c,labelType:this.sanitizeNodeLabelType(i?.type)};return u.info("Adding",l.id,l.nodes,l.dir),l.nodes=this.makeUniq(l,this.subGraphs).nodes,this.subGraphs.push(l),this.subGraphLookup.set(n,l),n}getSubGraphs(){return this.subGraphs}setClass(t,e){for(const s of t){const t=this.entities.get(s);if(t)for(const s of e)t.cssClasses+=" "+s;const i=this.subGraphLookup.get(s);if(i)for(const t of e)i.classes.push(t)}}subgraphNodeCache(t){const e=new Set;for(const s of t)for(const t of s.nodes)e.add(t);return e}makeUniq(t,e){const s=this.subgraphNodeCache(e),i=[];return t.nodes.forEach((e,n)=>{s.has(e)?u.warn(`Entity '${e}' already belongs to another subgraph and will be ignored`):i.push(t.nodes[n])}),{nodes:i}}sanitizeText(t){return d.sanitizeText(t,h())}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,y()}getData(){const t=[],e=[],s=h(),i=this.getSubGraphs(),n=new Map,r=new Map;for(let t=i.length-1;t>=0;t--){const e=i[t];e.nodes.length>0&&r.set(e.id,!0);for(const t of e.nodes)n.set(t,e.id)}for(let e=i.length-1;e>=0;e--){const r=i[e];t.push({id:r.id,label:r.title,labelStyle:"",labelType:r.labelType,parentId:n.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssStyles:r.cssStyles,cssClasses:r.classes.join(" "),shape:"rect",dir:r.dir,isGroup:!0,look:s.look})}const a=new Set(i.map(t=>t.id));let o=0;for(const e of this.entities.keys()){if(a.has(e))continue;const s=this.entities.get(e);s&&(s.cssCompiledStyles=this.getCompiledStyles(s.cssClasses.split(" ")),s.colorIndex=o++,t.push({...s,parentId:n.get(e),isGroup:!1}))}let c=0;for(const t of this.relationships){const i={id:p(t.entityA,t.entityB,{prefix:"id",counter:c++}),type:"normal",curve:"basis",start:t.entityA,end:t.entityB,label:t.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:t.relSpec.cardB.toLowerCase(),arrowTypeEnd:t.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==t.relSpec.relType?"solid":"dashed",look:s.look,labelType:"markdown"};e.push(i)}return{nodes:t,edges:e,other:{},config:s,direction:this.direction}}},A={};k(A,{draw:()=>I});var I=s(async function(s,i,n,r){u.info("REF0:"),u.info("Drawing er diagram (unified)",i);const{securityLevel:a,er:o,layout:c}=h(),l=r.db.getData(),d=t(i,a);l.type=r.type,l.layoutAlgorithm=E(c),l.config.flowchart.nodeSpacing=o?.nodeSpacing||140,l.config.flowchart.rankSpacing=o?.rankSpacing||80,l.direction=r.db.getDirection();const{config:y}=l,{look:p}=y;l.markers="neo"===p?["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:["only_one","zero_or_one","one_or_more","zero_or_more"],l.diagramId=i,await S(l,d);const b=d.selectAll('[id*="-background"]');Array.from(b).length>0&&b.each(function(){const t=T(this),e=t.attr("id").replace("-background",""),s=d.select(`#${CSS.escape(e)}`);if(!s.empty()){const e=s.attr("transform");t.attr("transform",e)}});$.insertTitle(d,"erDiagramTitleText",o?.titleTopMargin??25,r.db.getDiagramTitle()),e(d,8,"erDiagram",o?.useMaxWidth??!0)},"draw"),R=s((t,e)=>{const s=O,i=s(t,"r"),n=s(t,"g"),r=s(t,"b");return f(i,n,r,e)},"fade"),D=s(t=>{const{theme:e,bkgColorArray:s,borderColorArray:i}=t;if(!b(e,i))return"";const n=g(t.look),r=_(s);let a="";for(let t=0;t<m(i);t++){const e=i[t],o=r?`fill: ${s[t%s.length]};`:"";a+=`\n\n [data-look="${n}"][data-color-id="color-${t}"].node path {\n stroke: ${e};\n ${o}\n }\n\n [data-look="${n}"][data-color-id="color-${t}"].node rect {\n stroke: ${e};\n ${o}\n }\n `}return a},"genColor"),L=s(t=>{const{look:e,theme:s,erEdgeLabelBackground:n,strokeWidth:r}=t;return`\n ${D(t)}\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .labelBkg {\n background-color: ${i.has(s)&&n?n:R(t.tertiaryColor,.5)};\n }\n\n .edgeLabel {\n background-color: ${i.has(s)&&n?n:t.edgeLabelBackground};\n }\n .edgeLabel .label rect {\n fill: ${i.has(s)&&n?n:t.edgeLabelBackground};\n }\n .edgeLabel .label text {\n fill: ${t.textColor};\n }\n\n .edgeLabel .label {\n fill: ${t.nodeBorder};\n font-size: 14px;\n }\n\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .edge-pattern-dashed {\n stroke-dasharray: 8,8;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon\n {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: ${"neo"===e?r:"1px"};\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n stroke-width: ${"neo"===e?r:"1px"};\n fill: none;\n }\n\n .marker {\n fill: none !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n [data-look=neo].labelBkg {\n background-color: ${R(t.tertiaryColor,.5)};\n }\n\n .cluster rect {\n fill: ${t.clusterBkg??t.mainBkg};\n stroke: ${t.clusterBorder??t.nodeBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor??t.textColor};\n }\n\n .cluster-label text {\n fill: ${t.titleColor??t.textColor};\n }\n`},"getStyles"),v={parser:C,get db(){return new x},renderer:A,styles:L};export{v as diagram};
1
+ import{g as t}from"./chunk-XXDRQBXY-DPPGTM3w.js";import{s as e}from"./chunk-VQ5W62QI-CsGo0PTx.js";import{_ as s,L as i,b as n,a as r,s as a,g as o,v as c,x as l,c as h,l as u,m as d,C as y,A as p,E as b,F as g,G as _,M as m,I as f,N as k,r as E,t as S,k as T,u as $}from"./mermaid.core-DRk6tt5W.js";import{c as O}from"./channel-DWjyymG_.js";import"./index-BpcqEzEG.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-iref2pEJ.js";import"./settings-CBGV-lz3.js";import"./constants.js";import"./LoaderLayer-ECtsj85k.js";import"./websocket-CdeP8N_S.js";import"./index-2PTQqTnK.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";var N=function(){var t=s(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],i=[2,2],n=[1,7],r=[1,9],a=[1,10],o=[1,11],c=[1,12],l=[1,30],h=[1,23],u=[1,24],d=[1,25],y=[1,26],p=[1,27],b=[1,19],g=[1,28],_=[1,29],m=[1,20],f=[1,18],k=[1,21],E=[1,22],S=[2,6],T=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],$=[1,36],O=[1,37],N=[1,38],C=[1,39],x=[1,40],A=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],I=[1,46],R=[1,47],D=[1,57],L=[43,51,53,54,55,74,75],v=[1,70],w=[1,68],M=[1,65],B=[1,69],G=[1,71],F=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],Y=[1,78],j=[1,77],P=[1,76],z=[69,70,71,72,73],U=[1,91],K=[6,9,45,50],Z=[6,9,12,44,45,50,51,52],W=[1,101],Q=[1,100],X=[1,99],q=[18,61],H=[1,110],V=[1,109],J=[20,43,51,53,54,55],tt=[18,61,64,66],et={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"NEWLINE",12:"COLON",14:"STYLE_SEPARATOR",16:"BLOCK_START",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",33:"END",34:"SUBGRAPH",37:"direction_tb",38:"direction_bt",39:"direction_rl",40:"direction_lr",41:"CLASSDEF",43:"UNICODE_TEXT",44:"STYLE_TEXT",45:"COMMA",46:"CLASS",47:"STYLE",50:"SEMI",51:"NUM",52:"BRKT",53:"ENTITY_NAME",54:"DECIMAL_NUM",55:"ENTITY_ONE",61:"ATTRIBUTE_WORD",62:"?",64:",",65:"ATTRIBUTE_KEY",66:"COMMENT",69:"ZERO_OR_ONE",70:"ZERO_OR_MORE",71:"ONE_OR_MORE",72:"ONLY_ONE",73:"MD_PARENT",74:"NON_IDENTIFYING",75:"IDENTIFYING",76:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:s(function(t,e,s,i,n,r,a){var o=r.length-1;switch(n){case 1:break;case 2:case 5:case 6:this.$=[];break;case 3:this.$=r[o-1].concat(r[o]);break;case 4:case 34:case 59:case 60:case 61:case 62:case 86:case 69:case 71:case 74:this.$=r[o];break;case 7:i.addEntity(r[o-4]),i.addEntity(r[o-2]),i.addRelationship(r[o-4],r[o],r[o-2],r[o-3]),this.$=[r[o-4],r[o-2]];break;case 8:i.addEntity(r[o-8]),i.addEntity(r[o-4]),i.addRelationship(r[o-8],r[o],r[o-4],r[o-5]),i.setClass([r[o-8]],r[o-6]),i.setClass([r[o-4]],r[o-2]),this.$=[r[o-8],r[o-4]];break;case 9:i.addEntity(r[o-6]),i.addEntity(r[o-2]),i.addRelationship(r[o-6],r[o],r[o-2],r[o-3]),i.setClass([r[o-6]],r[o-4]),this.$=[r[o-6],r[o-2]];break;case 10:i.addEntity(r[o-6]),i.addEntity(r[o-4]),i.addRelationship(r[o-6],r[o],r[o-4],r[o-5]),i.setClass([r[o-4]],r[o-2]),this.$=[r[o-6],r[o-4]];break;case 11:i.addEntity(r[o-3]),i.addAttributes(r[o-3],r[o-1]),this.$=[r[o-3]];break;case 12:i.addEntity(r[o-5]),i.addAttributes(r[o-5],r[o-1]),i.setClass([r[o-5]],r[o-3]),this.$=[r[o-5]];break;case 13:i.addEntity(r[o-2]),this.$=[r[o-2]];break;case 14:i.addEntity(r[o-4]),i.setClass([r[o-4]],r[o-2]),this.$=[r[o-4]];break;case 15:i.addEntity(r[o]),this.$=[r[o]];break;case 16:i.addEntity(r[o-2]),i.setClass([r[o-2]],r[o]),this.$=[r[o-2]];break;case 17:i.addEntity(r[o-6],r[o-4]),i.addAttributes(r[o-6],r[o-1]),this.$=[r[o-6]];break;case 18:i.addEntity(r[o-8],r[o-6]),i.addAttributes(r[o-8],r[o-1]),i.setClass([r[o-8]],r[o-3]),this.$=[r[o-8]];break;case 19:i.addEntity(r[o-5],r[o-3]),this.$=[r[o-5]];break;case 20:i.addEntity(r[o-7],r[o-5]),i.setClass([r[o-7]],r[o-2]),this.$=[r[o-7]];break;case 21:i.addEntity(r[o-3],r[o-1]);break;case 22:i.addEntity(r[o-5],r[o-3]),i.setClass([r[o-5]],r[o]);break;case 23:case 24:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 25:case 26:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 27:i.subgraphDepth?this.$=r[o]:(i.setDirection(r[o].value),this.$=[]);break;case 31:i.subgraphDepth=(i.subgraphDepth||1)-1,this.$=i.addSubGraph({text:r[o-2].id},r[o-1],{text:r[o-2].text});break;case 32:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:r[o-1],text:r[o-1]};break;case 33:i.subgraphDepth=(i.subgraphDepth||0)+1,this.$={id:r[o-4],text:r[o-2]};break;case 35:this.$=r[o-1]+" "+r[o];break;case 36:this.$={stmt:"dir",value:"TB"};break;case 37:this.$={stmt:"dir",value:"BT"};break;case 38:this.$={stmt:"dir",value:"RL"};break;case 39:this.$={stmt:"dir",value:"LR"};break;case 40:this.$=r[o-3],i.addClass(r[o-2],r[o-1]);break;case 41:case 42:case 63:case 72:case 47:this.$=[r[o]];break;case 43:case 44:this.$=r[o-2].concat([r[o]]);break;case 45:this.$=r[o-2],i.setClass(r[o-1],r[o]);break;case 46:this.$=r[o-3],i.addCssStyles(r[o-2],r[o-1]);break;case 48:case 73:r[o-2].push(r[o]),this.$=r[o-2];break;case 50:case 70:this.$=r[o-1]+r[o];break;case 58:case 84:case 85:case 75:this.$=r[o].replace(/"/g,"");break;case 64:r[o].push(r[o-1]),this.$=r[o];break;case 65:this.$={type:r[o-1],name:r[o]};break;case 66:this.$={type:r[o-2],name:r[o-1],keys:r[o]};break;case 67:this.$={type:r[o-2],name:r[o-1],comment:r[o]};break;case 68:this.$={type:r[o-3],name:r[o-2],keys:r[o-1],comment:r[o]};break;case 76:this.$={cardA:r[o],relType:r[o-1],cardB:r[o-2]};break;case 77:this.$=i.Cardinality.ZERO_OR_ONE;break;case 78:this.$=i.Cardinality.ZERO_OR_MORE;break;case 79:this.$=i.Cardinality.ONE_OR_MORE;break;case 80:this.$=i.Cardinality.ONLY_ONE;break;case 81:this.$=i.Cardinality.MD_PARENT;break;case 82:this.$=i.Identification.NON_IDENTIFYING;break;case 83:this.$=i.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,i,{5:3}),{6:[1,4],7:5,8:6,9:n,10:8,21:r,23:a,25:o,27:c,28:13,29:14,30:15,31:16,32:17,34:l,37:h,38:u,39:d,40:y,41:p,43:b,46:g,47:_,51:m,53:f,54:k,55:E},t(e,S,{1:[2,1]}),t(T,[2,3]),t(T,[2,4]),t(T,[2,5]),t(T,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:$,70:O,71:N,72:C,73:x}),{22:[1,41]},{24:[1,42]},{26:[1,43]},t(T,[2,26]),t(T,[2,27]),t(T,[2,28]),t(T,[2,29]),t(T,[2,30]),t(T,i,{5:44}),t(A,[2,58]),t(A,[2,59]),t(A,[2,60]),t(A,[2,61]),t(A,[2,62]),t(T,[2,36]),t(T,[2,37]),t(T,[2,38]),t(T,[2,39]),{15:45,43:I,44:R},{15:48,43:I,44:R},{15:49,43:I,44:R},{10:50,43:b,51:m,53:f,54:k,55:E},{10:51,43:b,51:m,53:f,54:k,55:E},{15:52,43:I,44:R},{17:53,18:[1,54],56:55,57:56,61:D},{10:58,43:b,51:m,53:f,54:k,55:E},{68:59,74:[1,60],75:[1,61]},t(L,[2,77]),t(L,[2,78]),t(L,[2,79]),t(L,[2,80]),t(L,[2,81]),t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),{6:[1,63],7:5,8:6,9:n,10:8,21:r,23:a,25:o,27:c,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:l,37:h,38:u,39:d,40:y,41:p,43:b,46:g,47:_,51:m,53:f,54:k,55:E},{12:v,42:64,44:w,45:M,48:66,49:67,51:B,52:G},t(F,[2,41]),t(F,[2,42]),{15:72,43:I,44:R,45:M},{12:v,42:73,44:w,45:M,48:66,49:67,51:B,52:G},{6:Y,9:j,19:[1,75],35:74,50:P},{12:[1,79],14:[1,80]},t(T,[2,16],{67:35,11:81,16:[1,82],45:M,69:$,70:O,71:N,72:C,73:x}),{18:[1,83]},t(T,[2,13]),{17:84,18:[2,63],56:55,57:56,61:D},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:$,70:O,71:N,72:C,73:x},t(z,[2,82]),t(z,[2,83]),t(T,[2,31]),t(T,S),{6:Y,9:j,35:90,45:U,50:P},{43:[1,92],44:[1,93]},t(K,[2,47],{49:94,12:v,44:w,51:B,52:G}),t(Z,[2,49]),t(Z,[2,54]),t(Z,[2,55]),t(Z,[2,56]),t(Z,[2,57]),t(T,[2,45],{45:M}),{6:Y,9:j,35:95,45:U,50:P},t(T,[2,32]),{10:97,36:96,43:b,51:m,53:f,54:k,55:E},t(T,[2,51]),t(T,[2,52]),t(T,[2,53]),{13:98,43:W,53:Q,76:X},{15:102,43:I,44:R},{10:103,43:b,51:m,53:f,54:k,55:E},{17:104,18:[1,105],56:55,57:56,61:D},t(T,[2,11]),{18:[2,64]},t(q,[2,65],{59:106,60:107,63:108,65:H,66:V}),t([18,61,65,66],[2,71]),{61:[2,70]},t(T,[2,21],{14:[1,112],16:[1,111]}),t([43,51,53,54,55],[2,76]),t(T,[2,40]),{12:v,44:w,48:113,49:67,51:B,52:G},t(F,[2,43]),t(F,[2,44]),t(Z,[2,50]),t(T,[2,46]),{10:115,20:[1,114],43:b,51:m,53:f,54:k,55:E},t(J,[2,34]),t(T,[2,7]),t(T,[2,84]),t(T,[2,85]),t(T,[2,86]),{12:[1,116],45:M},{12:[1,118],14:[1,117]},{18:[1,119]},t(T,[2,14]),t(q,[2,66],{60:120,64:[1,121],66:V}),t(q,[2,67]),t(tt,[2,72]),t(q,[2,75]),t(tt,[2,74]),{17:122,18:[1,123],56:55,57:56,61:D},{15:124,43:I,44:R},t(K,[2,48],{49:94,12:v,44:w,51:B,52:G}),{6:Y,9:j,35:125,50:P},t(J,[2,35]),{13:126,43:W,53:Q,76:X},{15:127,43:I,44:R},{13:128,43:W,53:Q,76:X},t(T,[2,12]),t(q,[2,68]),{63:129,65:H},{18:[1,130]},t(T,[2,19]),t(T,[2,22],{16:[1,131],45:M}),t(T,[2,33]),t(T,[2,10]),{12:[1,132],45:M},t(T,[2,9]),t(tt,[2,73]),t(T,[2,17]),{17:133,18:[1,134],56:55,57:56,61:D},{13:135,43:W,53:Q,76:X},{18:[1,136]},t(T,[2,20]),t(T,[2,8]),t(T,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:s(function(t,e){if(!e.recoverable){var s=new Error(t);throw s.hash=e,s}this.trace(t)},"parseError"),parse:s(function(t){var e=this,i=[0],n=[],r=[null],a=[],o=this.table,c="",l=0,h=0,u=a.slice.call(arguments,1),d=Object.create(this.lexer),y={yy:{}};for(var p in this.yy)Object.prototype.hasOwnProperty.call(this.yy,p)&&(y.yy[p]=this.yy[p]);d.setInput(t,y.yy),y.yy.lexer=d,y.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var b=d.yylloc;a.push(b);var g=d.options&&d.options.ranges;function _(){var t;return"number"!=typeof(t=n.pop()||d.lex()||1)&&(t instanceof Array&&(t=(n=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,s(function(t){i.length=i.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),s(_,"lex");for(var m,f,k,E,S,T,$,O,N={};;){if(f=i[i.length-1],this.defaultActions[f]?k=this.defaultActions[f]:(null==m&&(m=_()),k=o[f]&&o[f][m]),void 0===k||!k.length||!k[0]){var C="";for(S in O=[],o[f])this.terminals_[S]&&S>2&&O.push("'"+this.terminals_[S]+"'");C=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+O.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(C,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:b,expected:O})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+m);switch(k[0]){case 1:i.push(m),r.push(d.yytext),a.push(d.yylloc),i.push(k[1]),m=null,h=d.yyleng,c=d.yytext,l=d.yylineno,b=d.yylloc;break;case 2:if(T=this.productions_[k[1]][1],N.$=r[r.length-T],N._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},g&&(N._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(N,[c,h,l,y.yy,k[1],r,a].concat(u))))return E;T&&(i=i.slice(0,-1*T*2),r=r.slice(0,-1*T),a=a.slice(0,-1*T)),i.push(this.productions_[k[1]][0]),r.push(N.$),a.push(N._$),$=o[i[i.length-2]][i[i.length-1]],i.push($);break;case 3:return!0}}return!0},"parse")},st=function(){return{EOF:1,parseError:s(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:s(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:s(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:s(function(t){this.unput(this.match.slice(t))},"less"),pastInput:s(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:s(function(t,e){var s,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack){for(var r in n)this[r]=n[r];return!1}return!1},"test_match"),next:s(function(){if(this.done)return this.EOF;var t,e,s,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if((s=this._input.match(this.rules[n[r]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,n[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:s(function(){var t=this.next();return t||this.lex()},"lex"),begin:s(function(t){this.conditionStack.push(t)},"begin"),popState:s(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:s(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:s(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:s(function(t){this.begin(t)},"pushState"),stateStackSize:s(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:s(function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),23;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),25;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 28:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:case 22:case 30:case 37:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin("block"),16;case 17:case 18:case 40:return 52;case 19:case 39:return 45;case 20:return 14;case 21:case 38:return 12;case 23:return 65;case 24:case 25:case 27:return 61;case 26:this.begin("block_bq");break;case 29:return 66;case 31:return this.popState(),18;case 32:case 81:return e.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin("style"),47;case 36:return this.popState(),9;case 41:return this.begin("style"),41;case 42:return 46;case 43:return 34;case 44:return 33;case 45:case 49:case 50:case 68:return 69;case 46:case 47:case 48:case 56:case 58:case 70:return 71;case 51:case 52:case 53:case 54:case 55:case 57:case 69:return 70;case 59:case 60:case 62:case 63:case 64:case 67:return 72;case 61:return 54;case 65:return 55;case 66:return 51;case 71:return 73;case 72:case 75:case 76:case 77:return 74;case 73:case 74:return 75;case 78:return 44;case 79:return 50;case 80:return 43;case 82:return 6}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}}}();function it(){this.yy={}}return et.lexer=st,s(it,"Parser"),it.prototype=et,et.Parser=it,new it}();N.parser=N;var C=N,x=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction="TB",this.Cardinality={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},this.Identification={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},this.setAccTitle=n,this.getAccTitle=r,this.setAccDescription=a,this.getAccDescription=o,this.setDiagramTitle=c,this.getDiagramTitle=l,this.getConfig=s(()=>h().er,"getConfig"),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{s(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,u.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-${this.entities.size}`,label:t,attributes:[],alias:e,shape:"erBox",look:h().look??"default",cssClasses:"default",cssStyles:[],labelType:"markdown"}),u.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){const s=this.addEntity(t);let i;for(i=e.length-1;i>=0;i--)e[i].keys||(e[i].keys=[]),e[i].comment||(e[i].comment=""),s.attributes.push(e[i]),u.debug("Added attribute ",e[i].name)}addRelationship(t,e,s,i){let n,r;if(this.subGraphLookup.has(t))n=t;else{const e=this.addEntity(t);if(!e)return;n=e.id}if(this.subGraphLookup.has(s))r=s;else{const t=this.addEntity(s);if(!t)return;r=t.id}const a={entityA:n,roleA:e,entityB:r,relSpec:i};this.relationships.push(a),u.debug("Added new relationship :",a)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(const s of t){const t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}addCssStyles(t,e){for(const s of t){const t=this.entities.get(s),i=this.subGraphLookup.get(s);if(e){if(t)for(const s of e)t.cssStyles.push(s);if(i){i.cssStyles||(i.cssStyles=[]);for(const t of e)i.cssStyles.push(t)}}}}addClass(t,e){t.forEach(t=>{let s=this.classes.get(t);void 0===s&&(s={id:t,styles:[],textStyles:[]},this.classes.set(t,s)),e&&e.forEach(function(t){if(/color/.exec(t)){const e=t.replace("fill","bgFill");s.textStyles.push(e)}s.styles.push(t)})})}addSubGraph(t,e,i){let n=t.text.trim(),r=i.text;const a=s(t=>{const e=new Set;let s;return{nodeList:t.filter(t=>{if(t?.stmt)return"dir"===t.stmt&&(s=t.value),!1;if("string"!=typeof t)return!1;const i=t.trim();return!!i&&(!e.has(i)&&(e.add(i),!0))}),dir:s}},"uniq")(e.flat()),o=a.nodeList,c=a.dir;n=n??"subGraph"+this.subCount,r=r||"",r=this.sanitizeText(r),this.subCount=this.subCount+1;const l={id:n,nodes:o,title:r.trim(),classes:[],cssStyles:[],dir:c,labelType:this.sanitizeNodeLabelType(i?.type)};return u.info("Adding",l.id,l.nodes,l.dir),l.nodes=this.makeUniq(l,this.subGraphs).nodes,this.subGraphs.push(l),this.subGraphLookup.set(n,l),n}getSubGraphs(){return this.subGraphs}setClass(t,e){for(const s of t){const t=this.entities.get(s);if(t)for(const s of e)t.cssClasses+=" "+s;const i=this.subGraphLookup.get(s);if(i)for(const t of e)i.classes.push(t)}}subgraphNodeCache(t){const e=new Set;for(const s of t)for(const t of s.nodes)e.add(t);return e}makeUniq(t,e){const s=this.subgraphNodeCache(e),i=[];return t.nodes.forEach((e,n)=>{s.has(e)?u.warn(`Entity '${e}' already belongs to another subgraph and will be ignored`):i.push(t.nodes[n])}),{nodes:i}}sanitizeText(t){return d.sanitizeText(t,h())}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,y()}getData(){const t=[],e=[],s=h(),i=this.getSubGraphs(),n=new Map,r=new Map;for(let t=i.length-1;t>=0;t--){const e=i[t];e.nodes.length>0&&r.set(e.id,!0);for(const t of e.nodes)n.set(t,e.id)}for(let e=i.length-1;e>=0;e--){const r=i[e];t.push({id:r.id,label:r.title,labelStyle:"",labelType:r.labelType,parentId:n.get(r.id),padding:8,cssCompiledStyles:this.getCompiledStyles(r.classes),cssStyles:r.cssStyles,cssClasses:r.classes.join(" "),shape:"rect",dir:r.dir,isGroup:!0,look:s.look})}const a=new Set(i.map(t=>t.id));let o=0;for(const e of this.entities.keys()){if(a.has(e))continue;const s=this.entities.get(e);s&&(s.cssCompiledStyles=this.getCompiledStyles(s.cssClasses.split(" ")),s.colorIndex=o++,t.push({...s,parentId:n.get(e),isGroup:!1}))}let c=0;for(const t of this.relationships){const i={id:p(t.entityA,t.entityB,{prefix:"id",counter:c++}),type:"normal",curve:"basis",start:t.entityA,end:t.entityB,label:t.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:t.relSpec.cardB.toLowerCase(),arrowTypeEnd:t.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==t.relSpec.relType?"solid":"dashed",look:s.look,labelType:"markdown"};e.push(i)}return{nodes:t,edges:e,other:{},config:s,direction:this.direction}}},A={};k(A,{draw:()=>I});var I=s(async function(s,i,n,r){u.info("REF0:"),u.info("Drawing er diagram (unified)",i);const{securityLevel:a,er:o,layout:c}=h(),l=r.db.getData(),d=t(i,a);l.type=r.type,l.layoutAlgorithm=E(c),l.config.flowchart.nodeSpacing=o?.nodeSpacing||140,l.config.flowchart.rankSpacing=o?.rankSpacing||80,l.direction=r.db.getDirection();const{config:y}=l,{look:p}=y;l.markers="neo"===p?["only_one_neo","zero_or_one_neo","one_or_more_neo","zero_or_more_neo"]:["only_one","zero_or_one","one_or_more","zero_or_more"],l.diagramId=i,await S(l,d);const b=d.selectAll('[id*="-background"]');Array.from(b).length>0&&b.each(function(){const t=T(this),e=t.attr("id").replace("-background",""),s=d.select(`#${CSS.escape(e)}`);if(!s.empty()){const e=s.attr("transform");t.attr("transform",e)}});$.insertTitle(d,"erDiagramTitleText",o?.titleTopMargin??25,r.db.getDiagramTitle()),e(d,8,"erDiagram",o?.useMaxWidth??!0)},"draw"),R=s((t,e)=>{const s=O,i=s(t,"r"),n=s(t,"g"),r=s(t,"b");return f(i,n,r,e)},"fade"),D=s(t=>{const{theme:e,bkgColorArray:s,borderColorArray:i}=t;if(!b(e,i))return"";const n=g(t.look),r=_(s);let a="";for(let t=0;t<m(i);t++){const e=i[t],o=r?`fill: ${s[t%s.length]};`:"";a+=`\n\n [data-look="${n}"][data-color-id="color-${t}"].node path {\n stroke: ${e};\n ${o}\n }\n\n [data-look="${n}"][data-color-id="color-${t}"].node rect {\n stroke: ${e};\n ${o}\n }\n `}return a},"genColor"),L=s(t=>{const{look:e,theme:s,erEdgeLabelBackground:n,strokeWidth:r}=t;return`\n ${D(t)}\n .entityBox {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n }\n\n .relationshipLabelBox {\n fill: ${t.tertiaryColor};\n opacity: 0.7;\n background-color: ${t.tertiaryColor};\n rect {\n opacity: 0.5;\n }\n }\n\n .labelBkg {\n background-color: ${i.has(s)&&n?n:R(t.tertiaryColor,.5)};\n }\n\n .edgeLabel {\n background-color: ${i.has(s)&&n?n:t.edgeLabelBackground};\n }\n .edgeLabel .label rect {\n fill: ${i.has(s)&&n?n:t.edgeLabelBackground};\n }\n .edgeLabel .label text {\n fill: ${t.textColor};\n }\n\n .edgeLabel .label {\n fill: ${t.nodeBorder};\n font-size: 14px;\n }\n\n .label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .edge-pattern-dashed {\n stroke-dasharray: 8,8;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon\n {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: ${"neo"===e?r:"1px"};\n }\n\n .relationshipLine {\n stroke: ${t.lineColor};\n stroke-width: ${"neo"===e?r:"1px"};\n fill: none;\n }\n\n .marker {\n fill: none !important;\n stroke: ${t.lineColor} !important;\n stroke-width: 1;\n }\n [data-look=neo].labelBkg {\n background-color: ${R(t.tertiaryColor,.5)};\n }\n\n .cluster rect {\n fill: ${t.clusterBkg??t.mainBkg};\n stroke: ${t.clusterBorder??t.nodeBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor??t.textColor};\n }\n\n .cluster-label text {\n fill: ${t.titleColor??t.textColor};\n }\n`},"getStyles"),v={parser:C,get db(){return new x},renderer:A,styles:L};export{v as diagram};
@@ -0,0 +1 @@
1
+ import{d as r}from"./chunk-NQOKRVIF-D0-2mmH4.js";export{c as createFlowDiagram}from"./chunk-NQOKRVIF-D0-2mmH4.js";import"./mermaid.core-DRk6tt5W.js";import"./chunk-5VM5RSS4-CS0kZLYA.js";import"./chunk-XXDRQBXY-DPPGTM3w.js";import"./chunk-VQ5W62QI-CsGo0PTx.js";import"./chunk-55XCU76K-CvYWAV_o.js";import"./channel-DWjyymG_.js";import"./index-BpcqEzEG.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-iref2pEJ.js";import"./settings-CBGV-lz3.js";import"./constants.js";import"./LoaderLayer-ECtsj85k.js";import"./websocket-CdeP8N_S.js";import"./index-2PTQqTnK.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./string-DPJhNSkw.js";export{r as diagram};
@@ -1 +1 @@
1
- import{g as t,s as e,x as n,v as i,a as s,b as r,_ as a,c as o,k as c,d as l,bd as d,l as u,m as h,p as f,C as m,u as y}from"./mermaid.core-DKkN0L2R.js";import{z as k}from"./index-DTAG4nDF.js";import{t as p,m as g,a as v,b as x,c as b,d as T,e as w,f as $,g as _,h as D,i as M,j as S,k as C,l as E,n as Y,s as A,o as L}from"./time-DP3lbwAd.js";import{l as I}from"./linear-CIPQsvV7.js";import{R as O,r as F,d as W,e as P,C as N,n as j,h as z}from"./string-DPJhNSkw.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-BHuDJzTw.js";import"./settings-BONQQsPx.js";import"./constants.js";import"./LoaderLayer-Cv80UCdL.js";import"./websocket-B2hJys_Q.js";import"./index-_kF3_0-k.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./init-DLRA0X12.js";import"./defaultLocale-HOdfsG1x.js";const H=Math.PI/180,B=180/Math.PI,R=.96422,G=.82521,V=4/29,U=6/29,Z=3*U*U,q=U*U*U;function X(t){if(t instanceof Q)return new Q(t.l,t.a,t.b,t.opacity);if(t instanceof it)return st(t);t instanceof O||(t=F(t));var e,n,i=et(t.r),s=et(t.g),r=et(t.b),a=J((.2225045*i+.7168786*s+.0606169*r)/1);return i===s&&s===r?e=n=a:(e=J((.4360747*i+.3850649*s+.1430804*r)/R),n=J((.0139322*i+.0971045*s+.7141733*r)/G)),new Q(116*a-16,500*(e-a),200*(a-n),t.opacity)}function Q(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}function J(t){return t>q?Math.pow(t,1/3):t/Z+V}function K(t){return t>U?t*t*t:Z*(t-V)}function tt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function et(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function nt(t,e,n,i){return 1===arguments.length?function(t){if(t instanceof it)return new it(t.h,t.c,t.l,t.opacity);if(t instanceof Q||(t=X(t)),0===t.a&&0===t.b)return new it(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*B;return new it(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new it(t,e,n,null==i?1:i)}function it(t,e,n,i){this.h=+t,this.c=+e,this.l=+n,this.opacity=+i}function st(t){if(isNaN(t.h))return new Q(t.l,0,0,t.opacity);var e=t.h*H;return new Q(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}W(Q,function(t,e,n,i){return 1===arguments.length?X(t):new Q(t,e,n,null==i?1:i)},P(N,{brighter(t){return new Q(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new Q(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=R*K(e),t=1*K(t),n=G*K(n),new O(tt(3.1338561*e-1.6168667*t-.4906146*n),tt(-.9787684*e+1.9161415*t+.033454*n),tt(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),W(it,nt,P(N,{brighter(t){return new it(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new it(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return st(this).rgb()}}));var rt=function(t){return function(e,n){var i=t((e=nt(e)).h,(n=nt(n)).h),s=j(e.c,n.c),r=j(e.l,n.l),a=j(e.opacity,n.opacity);return function(t){return e.h=i(t),e.c=s(t),e.l=r(t),e.opacity=a(t),e+""}}}(z);function at(t){return t}var ot=1e-6;function ct(t){return"translate("+t+",0)"}function lt(t){return"translate(0,"+t+")"}function dt(t){return e=>+t(e)}function ut(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ht(){return!this.__axis}function ft(t,e){var n=[],i=null,s=null,r=6,a=6,o=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,l=1===t||4===t?-1:1,d=4===t||2===t?"x":"y",u=1===t||3===t?ct:lt;function h(h){var f=null==i?e.ticks?e.ticks.apply(e,n):e.domain():i,m=null==s?e.tickFormat?e.tickFormat.apply(e,n):at:s,y=Math.max(r,0)+o,k=e.range(),p=+k[0]+c,g=+k[k.length-1]+c,v=(e.bandwidth?ut:dt)(e.copy(),c),x=h.selection?h.selection():h,b=x.selectAll(".domain").data([null]),T=x.selectAll(".tick").data(f,e).order(),w=T.exit(),$=T.enter().append("g").attr("class","tick"),_=T.select("line"),D=T.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge($),_=_.merge($.append("line").attr("stroke","currentColor").attr(d+"2",l*r)),D=D.merge($.append("text").attr("fill","currentColor").attr(d,l*y).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==x&&(b=b.transition(h),T=T.transition(h),_=_.transition(h),D=D.transition(h),w=w.transition(h).attr("opacity",ot).attr("transform",function(t){return isFinite(t=v(t))?u(t+c):this.getAttribute("transform")}),$.attr("opacity",ot).attr("transform",function(t){var e=this.parentNode.__axis;return u((e&&isFinite(e=e(t))?e:v(t))+c)})),w.remove(),b.attr("d",4===t||2===t?a?"M"+l*a+","+p+"H"+c+"V"+g+"H"+l*a:"M"+c+","+p+"V"+g:a?"M"+p+","+l*a+"V"+c+"H"+g+"V"+l*a:"M"+p+","+c+"H"+g),T.attr("opacity",1).attr("transform",function(t){return u(v(t)+c)}),_.attr(d+"2",l*r),D.attr(d,l*y).text(m),x.filter(ht).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),x.each(function(){this.__axis=v})}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),h):i&&i.slice()},h.tickFormat=function(t){return arguments.length?(s=t,h):s},h.tickSize=function(t){return arguments.length?(r=a=+t,h):r},h.tickSizeInner=function(t){return arguments.length?(r=+t,h):r},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(o=+t,h):o},h.offset=function(t){return arguments.length?(c=+t,h):c},h}var mt,yt={exports:{}};var kt,pt,gt=k(mt?yt.exports:(mt=1,yt.exports=(kt="day",function(t,e,n){var i=function(t){return t.add(4-t.isoWeekday(),kt)},s=e.prototype;s.isoWeekYear=function(){return i(this).year()},s.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),kt);var e,s,r,a=i(this),o=(e=this.isoWeekYear(),r=4-(s=(this.$u?n.utc:n)().year(e).startOf("year")).isoWeekday(),s.isoWeekday()>4&&(r+=7),s.add(r,kt));return a.diff(o,"week")+1},s.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var r=s.startOf;s.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):r.bind(this)(t,e)}}))),vt={exports:{}};var xt,bt=(pt||(pt=1,vt.exports=function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,s=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,a={},o=function(t){return(t=+t)+(t>68?1900:2e3)},c=function(t){return function(e){this[t]=+e}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],d=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,i=a.meridiem;if(i){for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},h={A:[r,function(t){this.afternoon=u(t,!1)}],a:[r,function(t){this.afternoon=u(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[i,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[i,c("day")],Do:[r,function(t){var e=a.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],w:[s,c("week")],ww:[i,c("week")],M:[s,c("month")],MM:[i,c("month")],MMM:[r,function(t){var e=d("months"),n=(d("monthsShort")||e.map(function(t){return t.slice(0,3)})).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[r,function(t){var e=d("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(t){this.year=o(t)}],YYYY:[/\d{4}/,c("year")],Z:l,ZZ:l};function f(n){var i,s;i=n,s=a&&a.formats;for(var r=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,n,i){var r=i&&i.toUpperCase();return n||s[i]||t[i]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,e,n){return e||n.slice(1)})})).match(e),o=r.length,c=0;c<o;c+=1){var l=r[c],d=h[l],u=d&&d[0],f=d&&d[1];r[c]=f?{regex:u,parser:f}:l.replace(/^\[|\]$/g,"")}return function(t){for(var e={},n=0,i=0;n<o;n+=1){var s=r[n];if("string"==typeof s)i+=s.length;else{var a=s.regex,c=s.parser,l=t.slice(i),d=a.exec(l)[0];c.call(e,d),t=t.replace(d,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(o=t.parseTwoDigitYear);var i=e.prototype,s=i.parse;i.parse=function(t){var e=t.date,i=t.utc,r=t.args;this.$u=i;var o=r[1];if("string"==typeof o){var c=!0===r[2],l=!0===r[3],d=c||l,u=r[2];l&&(u=r[2]),a=this.$locale(),!c&&u&&(a=n.Ls[u]),this.$d=function(t,e,n,i){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var s=f(e)(t),r=s.year,a=s.month,o=s.day,c=s.hours,l=s.minutes,d=s.seconds,u=s.milliseconds,h=s.zone,m=s.week,y=new Date,k=o||(r||a?1:y.getDate()),p=r||y.getFullYear(),g=0;r&&!a||(g=a>0?a-1:y.getMonth());var v,x=c||0,b=l||0,T=d||0,w=u||0;return h?new Date(Date.UTC(p,g,k,x,b,T,w+60*h.offset*1e3)):n?new Date(Date.UTC(p,g,k,x,b,T,w)):(v=new Date(p,g,k,x,b,T,w),m&&(v=i(v).week(m).toDate()),v)}catch(t){return new Date("")}}(e,o,i,n),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&e!=this.format(o)&&(this.$d=new Date("")),a={}}else if(o instanceof Array)for(var h=o.length,m=1;m<=h;m+=1){r[1]=o[m-1];var y=n.apply(this,r);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}m===h&&(this.$d=new Date(""))}else s.call(this,t)}}}()),vt.exports),Tt=k(bt),wt={exports:{}};var $t,_t=(xt||(xt=1,wt.exports=function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return i.bind(this)(t);var s=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}});return i.bind(this)(r)}}),wt.exports),Dt=k(_t),Mt={exports:{}};var St=($t||($t=1,Mt.exports=function(){var t,e,n=1e3,i=6e4,s=36e5,r=864e5,a=31536e6,o=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,d={years:a,months:o,days:r,hours:s,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},u=function(t){return t instanceof g},h=function(t,e,n){return new g(t,n,e.$l)},f=function(t){return e.p(t)+"s"},m=function(t){return t<0},y=function(t){return m(t)?Math.ceil(t):Math.floor(t)},k=function(t){return Math.abs(t)},p=function(t,e){return t?m(t)?{negative:!0,format:""+k(t)+e}:{negative:!1,format:""+t+e}:{negative:!1,format:""}},g=function(){function m(t,e,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e)return h(t*d[f(e)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach(function(e){i.$d[f(e)]=t[e]}),this.calMilliseconds(),this;if("string"==typeof t){var s=t.match(c);if(s){var r=s.slice(2).map(function(t){return null!=t?Number(t):0});return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var k=m.prototype;return k.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce(function(e,n){return e+(t.$d[n]||0)*d[n]},0)},k.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=y(t/a),t%=a,this.$d.months=y(t/o),t%=o,this.$d.days=y(t/r),t%=r,this.$d.hours=y(t/s),t%=s,this.$d.minutes=y(t/i),t%=i,this.$d.seconds=y(t/n),t%=n,this.$d.milliseconds=t},k.toISOString=function(){var t=p(this.$d.years,"Y"),e=p(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=p(n,"D"),s=p(this.$d.hours,"H"),r=p(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var o=p(a,"S"),c=t.negative||e.negative||i.negative||s.negative||r.negative||o.negative,l=s.format||r.format||o.format?"T":"",d=(c?"-":"")+"P"+t.format+e.format+i.format+l+s.format+r.format+o.format;return"P"===d||"-P"===d?"P0D":d},k.toJSON=function(){return this.toISOString()},k.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return n.replace(l,function(t,e){return e||String(i[t])})},k.as=function(t){return this.$ms/d[f(t)]},k.get=function(t){var e=this.$ms,n=f(t);return"milliseconds"===n?e%=1e3:e="weeks"===n?y(e/d[n]):this.$d[n],e||0},k.add=function(t,e,n){var i;return i=e?t*d[f(e)]:u(t)?t.$ms:h(t,this).$ms,h(this.$ms+i*(n?-1:1),this)},k.subtract=function(t,e){return this.add(t,e,!0)},k.locale=function(t){var e=this.clone();return e.$l=t,e},k.clone=function(){return h(this.$ms,this)},k.humanize=function(e){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},m}(),v=function(t,e,n){return t.add(e.years()*n,"y").add(e.months()*n,"M").add(e.days()*n,"d").add(e.hours()*n,"h").add(e.minutes()*n,"m").add(e.seconds()*n,"s").add(e.milliseconds()*n,"ms")};return function(n,i,s){t=s,e=s().$utils(),s.duration=function(t,e){var n=s.locale();return h(t,{$l:n},e)},s.isDuration=u;var r=i.prototype.add,a=i.prototype.subtract;i.prototype.add=function(t,e){return u(t)?v(this,t,1):r.bind(this)(t,e)},i.prototype.subtract=function(t,e){return u(t)?v(this,t,-1):a.bind(this)(t,e)}}}()),Mt.exports),Ct=k(St),Et=function(){var t=a(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[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],s=[1,28],r=[1,29],o=[1,30],c=[1,31],l=[1,32],d=[1,33],u=[1,34],h=[1,9],f=[1,10],m=[1,11],y=[1,12],k=[1,13],p=[1,14],g=[1,15],v=[1,16],x=[1,19],b=[1,20],T=[1,21],w=[1,22],$=[1,23],_=[1,25],D=[1,35],M={trace:a(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:a(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setWeekend("friday");break;case 16:i.setWeekend("saturday");break;case 17:i.setDateFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 18:i.enableInclusiveEndDates(),this.$=r[o].substr(18);break;case 19:i.TopAxis(),this.$=r[o].substr(8);break;case 20:i.setAxisFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 21:i.setTickInterval(r[o].substr(13)),this.$=r[o].substr(13);break;case 22:i.setExcludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 23:i.setIncludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 24:i.setTodayMarker(r[o].substr(12)),this.$=r[o].substr(12);break;case 27:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 28:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 31:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 33:i.addTask(r[o-1],r[o]),this.$="task";break;case 34:this.$=r[o-1],i.setClickEvent(r[o-1],r[o],null);break;case 35:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 36:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],null),i.setLink(r[o-2],r[o]);break;case 37:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2],r[o-1]),i.setLink(r[o-3],r[o]);break;case 38:this.$=r[o-2],i.setClickEvent(r[o-2],r[o],null),i.setLink(r[o-2],r[o-1]);break;case 39:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-1],r[o]),i.setLink(r[o-3],r[o-2]);break;case 40:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 41:case 47:this.$=r[o-1]+" "+r[o];break;case 42:case 43:case 45:this.$=r[o-2]+" "+r[o-1]+" "+r[o];break;case 44:case 46:this.$=r[o-3]+" "+r[o-2]+" "+r[o-1]+" "+r[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:s,15:r,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:m,25:y,26:k,27:p,28:g,29:v,30:x,31:b,33:T,35:w,36:$,37:24,38:_,40:D},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:i,14:s,15:r,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:m,25:y,26:k,27:p,28:g,29:v,30:x,31:b,33:T,35:w,36:$,37:24,38:_,40:D},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:a(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:a(function(t){var e=this,n=[0],i=[],s=[null],r=[],o=this.table,c="",l=0,d=0,u=r.slice.call(arguments,1),h=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);h.setInput(t,f.yy),f.yy.lexer=h,f.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var y=h.yylloc;r.push(y);var k=h.options&&h.options.ranges;function p(){var t;return"number"!=typeof(t=i.pop()||h.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),a(p,"lex");for(var g,v,x,b,T,w,$,_,D={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==g&&(g=p()),x=o[v]&&o[v][g]),void 0===x||!x.length||!x[0]){var M="";for(T in _=[],o[v])this.terminals_[T]&&T>2&&_.push("'"+this.terminals_[T]+"'");M=h.showPosition?"Parse error on line "+(l+1)+":\n"+h.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(M,{text:h.match,token:this.terminals_[g]||g,line:h.yylineno,loc:y,expected:_})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(x[0]){case 1:n.push(g),s.push(h.yytext),r.push(h.yylloc),n.push(x[1]),g=null,d=h.yyleng,c=h.yytext,l=h.yylineno,y=h.yylloc;break;case 2:if(w=this.productions_[x[1]][1],D.$=s[s.length-w],D._$={first_line:r[r.length-(w||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(w||1)].first_column,last_column:r[r.length-1].last_column},k&&(D._$.range=[r[r.length-(w||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(D,[c,d,l,f.yy,x[1],s,r].concat(u))))return b;w&&(n=n.slice(0,-1*w*2),s=s.slice(0,-1*w),r=r.slice(0,-1*w)),n.push(this.productions_[x[1]][0]),s.push(D.$),r.push(D._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:a(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:a(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:a(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:a(function(t){this.unput(this.match.slice(t))},"less"),pastInput:a(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:a(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var t=this.next();return t||this.lex()},"lex"),begin:a(function(t){this.conditionStack.push(t)},"begin"),popState:a(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:a(function(t){this.begin(t)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}}();function C(){this.yy={}}return M.lexer=S,a(C,"Parser"),C.prototype=M,M.Parser=C,new C}();Et.parser=Et;var Yt=Et;d.extend(gt),d.extend(Tt),d.extend(Dt);var At,Lt,It={friday:5,saturday:6},Ot="",Ft="",Wt=void 0,Pt="",Nt=[],jt=[],zt=new Map,Ht=[],Bt=[],Rt="",Gt="",Vt=["active","done","crit","milestone","vert"],Ut=[],Zt="",qt=!1,Xt=!1,Qt="sunday",Jt="saturday",Kt=0,te=a(function(){Ht=[],Bt=[],Rt="",Ut=[],Oe=0,At=void 0,Lt=void 0,Ne=[],Ot="",Ft="",Gt="",Wt=void 0,Pt="",Nt=[],jt=[],qt=!1,Xt=!1,Kt=0,zt=new Map,Zt="",m(),Qt="sunday",Jt="saturday"},"clear"),ee=a(function(t){Zt=t},"setDiagramId"),ne=a(function(t){Ft=t},"setAxisFormat"),ie=a(function(){return Ft},"getAxisFormat"),se=a(function(t){Wt=t},"setTickInterval"),re=a(function(){return Wt},"getTickInterval"),ae=a(function(t){Pt=t},"setTodayMarker"),oe=a(function(){return Pt},"getTodayMarker"),ce=a(function(t){Ot=t},"setDateFormat"),le=a(function(){qt=!0},"enableInclusiveEndDates"),de=a(function(){return qt},"endDatesAreInclusive"),ue=a(function(){Xt=!0},"enableTopAxis"),he=a(function(){return Xt},"topAxisEnabled"),fe=a(function(t){Gt=t},"setDisplayMode"),me=a(function(){return Gt},"getDisplayMode"),ye=a(function(){return Ot},"getDateFormat"),ke=a((t,e)=>{const n=e.toLowerCase().split(/[\s,]+/).filter(t=>""!==t);return[...new Set([...t,...n])]},"mergeTokens"),pe=a(function(t){Nt=ke(Nt,t)},"setIncludes"),ge=a(function(){return Nt},"getIncludes"),ve=a(function(t){jt=ke(jt,t)},"setExcludes"),xe=a(function(){return jt},"getExcludes"),be=a(function(){return zt},"getLinks"),Te=a(function(t){Rt=t,Ht.push(t)},"addSection"),we=a(function(){return Ht},"getSections"),$e=a(function(){let t=Re();let e=0;for(;!t&&e<10;)t=Re(),e++;return Bt=Ne},"getTasks"),_e=a(function(t,e,n,i){const s=t.format(e.trim()),r=t.format("YYYY-MM-DD");return!i.includes(s)&&!i.includes(r)&&(!(!n.includes("weekends")||t.isoWeekday()!==It[Jt]&&t.isoWeekday()!==It[Jt]+1)||(!!n.includes(t.format("dddd").toLowerCase())||(n.includes(s)||n.includes(r))))},"isInvalidDate"),De=a(function(t){Qt=t},"setWeekday"),Me=a(function(){return Qt},"getWeekday"),Se=a(function(t){Jt=t},"setWeekend"),Ce=a(function(t,e,n,i){if(!n.length||t.manualEndTime)return;let s,r;s=t.startTime instanceof Date?d(t.startTime):d(t.startTime,e,!0),s=s.add(1,"d"),r=t.endTime instanceof Date?d(t.endTime):d(t.endTime,e,!0);const[a,o]=Ee(s,r,e,n,i);t.endTime=a.toDate(),t.renderEndTime=o},"checkTaskDates"),Ee=a(function(t,e,n,i,s){let r=!1,a=null;const o=e.add(1e4,"d");for(;t<=e;){if(r||(a=e.toDate()),r=_e(t,n,i,s),r&&(e=e.add(1,"d"))>o)throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");t=t.add(1,"d")}return[e,a]},"fixTaskDates"),Ye=a(function(t,e){u.warn(`Gantt: the "${t}" statement references unknown task id(s): ${e.join(", ")}. Make sure the referenced tasks exist and declare an id. Milestones need both an id and a duration, e.g. "Milestone :milestone, m1, 2023-01-01, 0d".`)},"warnAboutUnknownTaskIds"),Ae=a(function(t,e,n){n=n.trim();if(a(t=>{const e=t.trim();return"x"===e||"X"===e},"isTimestampFormat")(e)&&/^\d+$/.test(n))return new Date(Number(n));const i=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(null!==i){let t=null;const e=[],n=i.groups.ids.split(" ").filter(t=>""!==t);for(const i of n){const n=He(i);void 0!==n?(!t||n.endTime>t.endTime)&&(t=n):e.push(i)}if(e.length>0&&Ye("after",e),t)return t.endTime;const s=new Date;return s.setHours(0,0,0,0),s}let s=d(n,e.trim(),!0);if(s.isValid())return s.toDate();{u.debug("Invalid date:"+n),u.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}},"getStartDate"),Le=a(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),Ie=a(function(t,e,n,i=!1){n=n.trim();const s=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(null!==s){let t=null;const e=[],n=s.groups.ids.split(" ").filter(t=>""!==t);for(const i of n){const n=He(i);void 0!==n?(!t||n.startTime<t.startTime)&&(t=n):e.push(i)}if(e.length>0&&Ye("until",e),t)return t.startTime;const i=new Date;return i.setHours(0,0,0,0),i}let r=d(n,e.trim(),!0);if(r.isValid())return i&&(r=r.add(1,"d")),r.toDate();let a=d(t);const[o,c]=Le(n);if(Number.isNaN(o))u.warn(`Gantt: "${n}" is neither a valid date for the "${e.trim()}" date format nor a valid duration (e.g. "3d"), so it is ignored and the task gets a zero duration. Milestones need a duration too, e.g. "Milestone :milestone, m1, 2023-01-01, 0d".`);else{const t=a.add(o,c);t.isValid()&&(a=t)}return a.toDate()},"getEndDate"),Oe=0,Fe=a(function(t){return void 0===t?"task"+(Oe+=1):t},"parseId"),We=a(function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),s={};Je(i,s,Vt);for(let t=0;t<i.length;t++)i[t]=i[t].trim();let r="";switch(i.length){case 1:s.id=Fe(),s.startTime=t.endTime,r=i[0];break;case 2:s.id=Fe(),s.startTime=Ae(void 0,Ot,i[0]),r=i[1];break;case 3:s.id=Fe(i[0]),s.startTime=Ae(void 0,Ot,i[1]),r=i[2]}return r&&(s.endTime=Ie(s.startTime,Ot,r,qt),s.manualEndTime=d(r,"YYYY-MM-DD",!0).isValid(),Ce(s,Ot,jt,Nt)),s},"compileData"),Pe=a(function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),s={};Je(i,s,Vt);for(let t=0;t<i.length;t++)i[t]=i[t].trim();switch(i.length){case 1:s.id=Fe(),s.startTime={type:"prevTaskEnd",id:t},s.endTime={data:i[0]};break;case 2:s.id=Fe(),s.startTime={type:"getStartDate",startData:i[0]},s.endTime={data:i[1]};break;case 3:s.id=Fe(i[0]),s.startTime={type:"getStartDate",startData:i[1]},s.endTime={data:i[2]}}return s},"parseData"),Ne=[],je={},ze=a(function(t,e){const n={section:Rt,type:Rt,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=Pe(Lt,e);n.raw.startTime=i.startTime,n.raw.endTime=i.endTime,n.id=i.id,n.prevTaskId=Lt,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,n.vert=i.vert,n.vert?n.order=-1:(n.order=Kt,Kt++);const s=Ne.push(n);Lt=n.id,je[n.id]=s-1},"addTask"),He=a(function(t){const e=je[t];return Ne[e]},"findTaskById"),Be=a(function(t,e){const n={section:Rt,type:Rt,description:t,task:t,classes:[]},i=We(At,e);n.startTime=i.startTime,n.endTime=i.endTime,n.id=i.id,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,n.vert=i.vert,At=n,Bt.push(n)},"addTaskOrg"),Re=a(function(){const t=a(function(t){const e=Ne[t];let n="";switch(Ne[t].raw.startTime.type){case"prevTaskEnd":{const t=He(e.prevTaskId);e.startTime=t.endTime;break}case"getStartDate":n=Ae(void 0,Ot,Ne[t].raw.startTime.startData),n&&(Ne[t].startTime=n)}return Ne[t].startTime&&(Ne[t].endTime=Ie(Ne[t].startTime,Ot,Ne[t].raw.endTime.data,qt),Ne[t].endTime&&(Ne[t].processed=!0,Ne[t].manualEndTime=d(Ne[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Ce(Ne[t],Ot,jt,Nt))),Ne[t].processed},"compileTask");let e=!0;for(const[n,i]of Ne.entries())t(n),e=e&&i.processed;return e},"compileTasks"),Ge=a(function(t,e){let n=e;"loose"!==o().securityLevel&&(n=f.sanitizeUrl(e)),t.split(",").forEach(function(t){void 0!==He(t)&&(Ze(t,()=>{window.open(n,"_self")}),zt.set(t,n))}),Ve(t,"clickable")},"setLink"),Ve=a(function(t,e){t.split(",").forEach(function(t){let n=He(t);void 0!==n&&n.classes.push(e)})},"setClass"),Ue=a(function(t,e,n){if("loose"!==o().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof n){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<i.length;t++){let e=i[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),i[t]=e}}0===i.length&&i.push(t),void 0!==He(t)&&Ze(t,()=>{y.runFunc(e,...i)})},"setClickFun"),Ze=a(function(t,e){Ut.push(function(){const n=Zt?`${Zt}-${t}`:t,i=document.querySelector(`[id="${n}"]`);null!==i&&i.addEventListener("click",function(){e()})},function(){const n=Zt?`${Zt}-${t}`:t,i=document.querySelector(`[id="${n}-text"]`);null!==i&&i.addEventListener("click",function(){e()})})},"pushFun"),qe=a(function(t,e,n){t.split(",").forEach(function(t){Ue(t,e,n)}),Ve(t,"clickable")},"setClickEvent"),Xe=a(function(t){Ut.forEach(function(e){e(t)})},"bindFunctions"),Qe={getConfig:a(()=>o().gantt,"getConfig"),clear:te,setDateFormat:ce,getDateFormat:ye,enableInclusiveEndDates:le,endDatesAreInclusive:de,enableTopAxis:ue,topAxisEnabled:he,setAxisFormat:ne,getAxisFormat:ie,setTickInterval:se,getTickInterval:re,setTodayMarker:ae,getTodayMarker:oe,setAccTitle:r,getAccTitle:s,setDiagramTitle:i,getDiagramTitle:n,setDiagramId:ee,setDisplayMode:fe,getDisplayMode:me,setAccDescription:e,getAccDescription:t,addSection:Te,getSections:we,getTasks:$e,addTask:ze,findTaskById:He,addTaskOrg:Be,setIncludes:pe,getIncludes:ge,setExcludes:ve,getExcludes:xe,setClickEvent:qe,setLink:Ge,getLinks:be,bindFunctions:Xe,parseDuration:Le,isInvalidDate:_e,setWeekday:De,getWeekday:Me,setWeekend:Se};function Je(t,e,n){let i=!0;for(;i;)i=!1,n.forEach(function(n){const s=new RegExp("^\\s*"+n+"\\s*$");t[0].match(s)&&(e[n]=!0,t.shift(1),i=!0)})}a(Je,"getTaskTags"),d.extend(Ct);var Ke,tn=a(function(){u.debug("Something is calling, setConf, remove the call")},"setConf"),en={monday:S,tuesday:M,wednesday:D,thursday:_,friday:$,saturday:w,sunday:T},nn=a((t,e)=>{let n=[...t].map(()=>-1/0),i=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),s=0;for(const t of i)for(let i=0;i<n.length;i++)if(t.startTime>=n[i]){n[i]=t.endTime,t.order=i+e,i>s&&(s=i);break}return s},"getMaxIntersections"),sn=1e4,rn={parser:Yt,db:Qe,renderer:{setConf:tn,draw:a(function(t,e,n,i){const s=o().gantt;i.db.setDiagramId(e);const r=o().securityLevel;let f;"sandbox"===r&&(f=c("#i"+e));const m=c("sandbox"===r?f.nodes()[0].contentDocument.body:"body"),y="sandbox"===r?f.nodes()[0].contentDocument:document,k=y.getElementById(e);void 0===(Ke=k.parentElement.offsetWidth)&&(Ke=1200),void 0!==s.useWidth&&(Ke=s.useWidth);const T=i.db.getTasks(),w=T.filter(t=>!t.vert);let $=[];for(const t of w)$.push(t.type);$=B($);const _={};let D=2*s.topPadding;if("compact"===i.db.getDisplayMode()||"compact"===s.displayMode){const t={};for(const e of w)void 0===t[e.section]?t[e.section]=[e]:t[e.section].push(e);let e=0;for(const n of Object.keys(t)){const i=nn(t[n],e)+1;e+=i,D+=i*(s.barHeight+s.barGap),_[n]=i}}else{D+=w.length*(s.barHeight+s.barGap);for(const t of $)_[t]=w.filter(e=>e.type===t).length}k.setAttribute("viewBox","0 0 "+Ke+" "+D);const M=m.select(`[id="${e}"]`),S=p().domain([g(T,function(t){return t.startTime}),v(T,function(t){return t.endTime})]).rangeRound([0,Ke-s.leftPadding-s.rightPadding]);function O(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:n<i&&(s=-1),s}function F(t,e,n){const r=s.barHeight,a=r+s.barGap,o=s.topPadding,c=s.leftPadding,l=I().domain([0,$.length]).range(["#00B9FA","#F95002"]).interpolate(rt);P(a,o,c,e,n,t,i.db.getExcludes(),i.db.getIncludes()),j(c,o,e,n),W(t,a,o,c,r,l,e),z(a,o),H(c,o,e,n)}function W(t,n,r,a,l,d,u){t.sort((t,e)=>t.vert===e.vert?0:t.vert?1:-1);const h=t.filter(t=>!t.vert),f=[...new Set(h.map(t=>t.order))].map(t=>h.find(e=>e.order===t));M.append("g").selectAll("rect").data(f).enter().append("rect").attr("x",0).attr("y",function(t,e){return t.order*n+r-2}).attr("width",function(){return u-s.rightPadding/2}).attr("height",n).attr("class",function(t){for(const[e,n]of $.entries())if(t.type===n)return"section section"+e%s.numberSectionStyles;return"section section0"}).enter();const m=M.append("g").selectAll("rect").data(t).enter(),y=i.db.getLinks();m.append("rect").attr("id",function(t){return e+"-"+t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?S(t.startTime)+a+.5*(S(t.endTime)-S(t.startTime))-.5*l:S(t.startTime)+a}).attr("y",function(t,e){return e=t.order,t.vert?s.gridLineStartPadding:e*n+r}).attr("width",function(t){return t.milestone?l:t.vert?.08*l:S(t.renderEndTime||t.endTime)-S(t.startTime)}).attr("height",function(t){return t.vert?h.length*(s.barHeight+s.barGap)+2*s.barHeight:l}).attr("transform-origin",function(t,e){return e=t.order,(S(t.startTime)+a+.5*(S(t.endTime)-S(t.startTime))).toString()+"px "+(e*n+r+.5*l).toString()+"px"}).attr("class",function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[e,i]of $.entries())t.type===i&&(n=e%s.numberSectionStyles);let i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),t.vert&&(i=" vert "+i),i+=n,i+=" "+e,"task"+i}),m.append("text").attr("id",function(t){return e+"-"+t.id+"-text"}).text(function(t){return t.task}).attr("font-size",s.fontSize).attr("x",function(t){let e=S(t.startTime),n=S(t.renderEndTime||t.endTime);if(t.milestone&&(e+=.5*(S(t.endTime)-S(t.startTime))-.5*l,n=e+l),t.vert)return S(t.startTime)+a;const i=this.getBBox().width;return i>n-e?n+i+1.5*s.leftPadding>u?e+a-5:n+a+5:(n-e)/2+e+a}).attr("y",function(t,e){return t.vert?s.gridLineStartPadding+h.length*(s.barHeight+s.barGap)+60:t.order*n+s.barHeight/2+(s.fontSize/2-2)+r}).attr("text-height",l).attr("class",function(t){const e=S(t.startTime);let n=S(t.endTime);t.milestone&&(n=e+l);const i=this.getBBox().width;let r="";t.classes.length>0&&(r=t.classes.join(" "));let a=0;for(const[e,n]of $.entries())t.type===n&&(a=e%s.numberSectionStyles);let o="";return t.active&&(o=t.crit?"activeCritText"+a:"activeText"+a),t.done?o=t.crit?o+" doneCritText"+a:o+" doneText"+a:t.crit&&(o=o+" critText"+a),t.milestone&&(o+=" milestoneText"),t.vert&&(o+=" vertText"),i>n-e?n+i+1.5*s.leftPadding>u?r+" taskTextOutsideLeft taskTextOutside"+a+" "+o:r+" taskTextOutsideRight taskTextOutside"+a+" "+o+" width-"+i:r+" taskText taskText"+a+" "+o+" width-"+i});if("sandbox"===o().securityLevel){let t;t=c("#i"+e);const n=t.nodes()[0].contentDocument;m.filter(function(t){return y.has(t.id)}).each(function(t){var i=n.querySelector("#"+CSS.escape(e+"-"+t.id)),s=n.querySelector("#"+CSS.escape(e+"-"+t.id+"-text"));const r=i.parentNode;var a=n.createElement("a");a.setAttribute("xlink:href",y.get(t.id)),a.setAttribute("target","_top"),r.appendChild(a),a.appendChild(i),a.appendChild(s)})}}function P(t,n,r,a,o,c,l,h){if(0===l.length&&0===h.length)return;let f,m;for(const{startTime:t,endTime:e}of c)(void 0===f||t<f)&&(f=t),(void 0===m||e>m)&&(m=e);if(!f||!m)return;if(d(m).diff(d(f),"year")>5)return void u.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const y=i.db.getDateFormat(),k=[];let p=null,g=d(f);for(;g.valueOf()<=m;)i.db.isInvalidDate(g,y,l,h)?p?p.end=g:p={start:g,end:g}:p&&(k.push(p),p=null),g=g.add(1,"d");M.append("g").selectAll("rect").data(k).enter().append("rect").attr("id",t=>e+"-exclude-"+t.start.format("YYYY-MM-DD")).attr("x",t=>S(t.start.startOf("day"))+r).attr("y",s.gridLineStartPadding).attr("width",t=>S(t.end.endOf("day"))-S(t.start.startOf("day"))).attr("height",o-n-s.gridLineStartPadding).attr("transform-origin",function(e,n){return(S(e.start)+r+.5*(S(e.end)-S(e.start))).toString()+"px "+(n*t+.5*o).toString()+"px"}).attr("class","exclude-range")}function N(t,e,n,i){if(n<=0||t>e)return 1/0;const s=e-t,r=d.duration({[i??"day"]:n}).asMilliseconds();return r<=0?1/0:Math.ceil(s/r)}function j(t,e,n,r){const a=i.db.getDateFormat(),o=i.db.getAxisFormat();let c;c=o||("D"===a?"%d":s.axisFormat??"%Y-%m-%d");let l=(d=S,ft(3,d)).tickSize(-r+e+s.gridLineStartPadding).tickFormat(x(c));var d;const h=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||s.tickInterval);if(null!==h){const t=parseInt(h[1],10);if(isNaN(t)||t<=0)u.warn(`Invalid tick interval value: "${h[1]}". Skipping custom tick interval.`);else{const e=h[2],n=i.db.getWeekday()||s.weekday,r=S.domain(),a=N(r[0],r[1],t,e);if(a>sn)u.warn(`The tick interval "${t}${e}" would generate ${a} ticks, which exceeds the maximum allowed (10000). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(e){case"millisecond":l.ticks(L.every(t));break;case"second":l.ticks(A.every(t));break;case"minute":l.ticks(Y.every(t));break;case"hour":l.ticks(E.every(t));break;case"day":l.ticks(C.every(t));break;case"week":l.ticks(en[n].every(t));break;case"month":l.ticks(b.every(t))}}}if(M.append("g").attr("class","grid").attr("transform","translate("+t+", "+(r-50)+")").call(l).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||s.topAxis){let n=function(t){return ft(1,t)}(S).tickSize(-r+e+s.gridLineStartPadding).tickFormat(x(c));if(null!==h){const t=parseInt(h[1],10);if(isNaN(t)||t<=0)u.warn(`Invalid tick interval value: "${h[1]}". Skipping custom tick interval.`);else{const e=h[2],r=i.db.getWeekday()||s.weekday,a=S.domain();if(N(a[0],a[1],t,e)<=sn)switch(e){case"millisecond":n.ticks(L.every(t));break;case"second":n.ticks(A.every(t));break;case"minute":n.ticks(Y.every(t));break;case"hour":n.ticks(E.every(t));break;case"day":n.ticks(C.every(t));break;case"week":n.ticks(en[r].every(t));break;case"month":n.ticks(b.every(t))}}}M.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function z(t,e){let n=0;const i=Object.keys(_).map(t=>[t,_[t]]);M.append("g").selectAll("text").data(i).enter().append(function(t){const e=t[0].split(h.lineBreakRegex),n=-(e.length-1)/2,i=y.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[t,n]of e.entries()){const e=y.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttribute("alignment-baseline","central"),e.setAttribute("x","10"),t>0&&e.setAttribute("dy","1em"),e.textContent=n,i.appendChild(e)}return i}).attr("x",10).attr("y",function(s,r){if(!(r>0))return s[1]*t/2+e;for(let a=0;a<r;a++)return n+=i[r-1][1],s[1]*t/2+n*t+e}).attr("font-size",s.sectionFontSize).attr("class",function(t){for(const[e,n]of $.entries())if(t[0]===n)return"sectionTitle sectionTitle"+e%s.numberSectionStyles;return"sectionTitle"})}function H(t,e,n,r){const a=i.db.getTodayMarker();if("off"===a)return;const o=M.append("g").attr("class","today"),c=new Date,l=o.append("line");l.attr("x1",S(c)+t).attr("x2",S(c)+t).attr("y1",s.titleTopMargin).attr("y2",r-s.titleTopMargin).attr("class","today"),""!==a&&l.attr("style",a.replace(/,/g,";"))}function B(t){const e={},n=[];for(let i=0,s=t.length;i<s;++i)Object.prototype.hasOwnProperty.call(e,t[i])||(e[t[i]]=!0,n.push(t[i]));return n}a(O,"taskCompare"),T.sort(O),F(T,Ke,D),l(M,D,Ke,s.useMaxWidth),M.append("text").text(i.db.getDiagramTitle()).attr("x",Ke/2).attr("y",s.titleTopMargin).attr("class","titleText"),a(F,"makeGantt"),a(W,"drawRects"),a(P,"drawExcludeDays"),a(N,"getEstimatedTickCount"),a(j,"makeGrid"),a(z,"vertLabels"),a(H,"drawToday"),a(B,"checkUnique")},"draw")},styles:a(t=>`\n .mermaid-main-font {\n font-family: ${t.fontFamily};\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n /* Done task text displayed outside the bar sits against the diagram background,\n not against the done-task bar, so it must use the outside/contrast color. */\n .doneText0.taskTextOutsideLeft,\n .doneText0.taskTextOutsideRight,\n .doneText1.taskTextOutsideLeft,\n .doneText1.taskTextOutsideRight,\n .doneText2.taskTextOutsideLeft,\n .doneText2.taskTextOutsideRight,\n .doneText3.taskTextOutsideLeft,\n .doneText3.taskTextOutsideRight {\n fill: ${t.taskTextOutsideColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n /* Done-crit task text outside the bar — same reasoning as doneText above. */\n .doneCritText0.taskTextOutsideLeft,\n .doneCritText0.taskTextOutsideRight,\n .doneCritText1.taskTextOutsideLeft,\n .doneCritText1.taskTextOutsideRight,\n .doneCritText2.taskTextOutsideLeft,\n .doneCritText2.taskTextOutsideRight,\n .doneCritText3.taskTextOutsideLeft,\n .doneCritText3.taskTextOutsideRight {\n fill: ${t.taskTextOutsideColor} !important;\n }\n\n .vert {\n stroke: ${t.vertLineColor};\n }\n\n .vertText {\n font-size: 15px;\n text-anchor: middle;\n fill: ${t.vertLineColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: ${t.fontFamily};\n }\n`,"getStyles")};export{rn as diagram};
1
+ import{g as t,s as e,x as n,v as i,a as s,b as r,_ as a,c as o,k as c,d as l,bd as d,l as u,m as h,p as f,C as m,u as y}from"./mermaid.core-DRk6tt5W.js";import{z as k}from"./index-BpcqEzEG.js";import{t as p,m as g,a as v,b as x,c as b,d as T,e as w,f as $,g as _,h as D,i as M,j as S,k as C,l as E,n as Y,s as A,o as L}from"./time-DP3lbwAd.js";import{l as I}from"./linear-CIPQsvV7.js";import{R as O,r as F,d as W,e as P,C as N,n as j,h as z}from"./string-DPJhNSkw.js";import"react/jsx-runtime";import"react";import"./enums.js";import"./commons-iref2pEJ.js";import"./settings-CBGV-lz3.js";import"./constants.js";import"./LoaderLayer-ECtsj85k.js";import"./websocket-CdeP8N_S.js";import"./index-2PTQqTnK.js";import"motion/react";import"react-dom";import"swr";import"@ably/spaces";import"@ably/spaces/react";import"ably";import"ably/liveobjects";import"ably/react";import"@ably/spaces/dist/mjs/react";import"./init-DLRA0X12.js";import"./defaultLocale-HOdfsG1x.js";const H=Math.PI/180,B=180/Math.PI,R=.96422,G=.82521,V=4/29,U=6/29,Z=3*U*U,q=U*U*U;function X(t){if(t instanceof Q)return new Q(t.l,t.a,t.b,t.opacity);if(t instanceof it)return st(t);t instanceof O||(t=F(t));var e,n,i=et(t.r),s=et(t.g),r=et(t.b),a=J((.2225045*i+.7168786*s+.0606169*r)/1);return i===s&&s===r?e=n=a:(e=J((.4360747*i+.3850649*s+.1430804*r)/R),n=J((.0139322*i+.0971045*s+.7141733*r)/G)),new Q(116*a-16,500*(e-a),200*(a-n),t.opacity)}function Q(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}function J(t){return t>q?Math.pow(t,1/3):t/Z+V}function K(t){return t>U?t*t*t:Z*(t-V)}function tt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function et(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function nt(t,e,n,i){return 1===arguments.length?function(t){if(t instanceof it)return new it(t.h,t.c,t.l,t.opacity);if(t instanceof Q||(t=X(t)),0===t.a&&0===t.b)return new it(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*B;return new it(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new it(t,e,n,null==i?1:i)}function it(t,e,n,i){this.h=+t,this.c=+e,this.l=+n,this.opacity=+i}function st(t){if(isNaN(t.h))return new Q(t.l,0,0,t.opacity);var e=t.h*H;return new Q(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}W(Q,function(t,e,n,i){return 1===arguments.length?X(t):new Q(t,e,n,null==i?1:i)},P(N,{brighter(t){return new Q(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new Q(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=R*K(e),t=1*K(t),n=G*K(n),new O(tt(3.1338561*e-1.6168667*t-.4906146*n),tt(-.9787684*e+1.9161415*t+.033454*n),tt(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),W(it,nt,P(N,{brighter(t){return new it(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new it(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return st(this).rgb()}}));var rt=function(t){return function(e,n){var i=t((e=nt(e)).h,(n=nt(n)).h),s=j(e.c,n.c),r=j(e.l,n.l),a=j(e.opacity,n.opacity);return function(t){return e.h=i(t),e.c=s(t),e.l=r(t),e.opacity=a(t),e+""}}}(z);function at(t){return t}var ot=1e-6;function ct(t){return"translate("+t+",0)"}function lt(t){return"translate(0,"+t+")"}function dt(t){return e=>+t(e)}function ut(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function ht(){return!this.__axis}function ft(t,e){var n=[],i=null,s=null,r=6,a=6,o=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,l=1===t||4===t?-1:1,d=4===t||2===t?"x":"y",u=1===t||3===t?ct:lt;function h(h){var f=null==i?e.ticks?e.ticks.apply(e,n):e.domain():i,m=null==s?e.tickFormat?e.tickFormat.apply(e,n):at:s,y=Math.max(r,0)+o,k=e.range(),p=+k[0]+c,g=+k[k.length-1]+c,v=(e.bandwidth?ut:dt)(e.copy(),c),x=h.selection?h.selection():h,b=x.selectAll(".domain").data([null]),T=x.selectAll(".tick").data(f,e).order(),w=T.exit(),$=T.enter().append("g").attr("class","tick"),_=T.select("line"),D=T.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),T=T.merge($),_=_.merge($.append("line").attr("stroke","currentColor").attr(d+"2",l*r)),D=D.merge($.append("text").attr("fill","currentColor").attr(d,l*y).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==x&&(b=b.transition(h),T=T.transition(h),_=_.transition(h),D=D.transition(h),w=w.transition(h).attr("opacity",ot).attr("transform",function(t){return isFinite(t=v(t))?u(t+c):this.getAttribute("transform")}),$.attr("opacity",ot).attr("transform",function(t){var e=this.parentNode.__axis;return u((e&&isFinite(e=e(t))?e:v(t))+c)})),w.remove(),b.attr("d",4===t||2===t?a?"M"+l*a+","+p+"H"+c+"V"+g+"H"+l*a:"M"+c+","+p+"V"+g:a?"M"+p+","+l*a+"V"+c+"H"+g+"V"+l*a:"M"+p+","+c+"H"+g),T.attr("opacity",1).attr("transform",function(t){return u(v(t)+c)}),_.attr(d+"2",l*r),D.attr(d,l*y).text(m),x.filter(ht).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),x.each(function(){this.__axis=v})}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),h):i&&i.slice()},h.tickFormat=function(t){return arguments.length?(s=t,h):s},h.tickSize=function(t){return arguments.length?(r=a=+t,h):r},h.tickSizeInner=function(t){return arguments.length?(r=+t,h):r},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(o=+t,h):o},h.offset=function(t){return arguments.length?(c=+t,h):c},h}var mt,yt={exports:{}};var kt,pt,gt=k(mt?yt.exports:(mt=1,yt.exports=(kt="day",function(t,e,n){var i=function(t){return t.add(4-t.isoWeekday(),kt)},s=e.prototype;s.isoWeekYear=function(){return i(this).year()},s.isoWeek=function(t){if(!this.$utils().u(t))return this.add(7*(t-this.isoWeek()),kt);var e,s,r,a=i(this),o=(e=this.isoWeekYear(),r=4-(s=(this.$u?n.utc:n)().year(e).startOf("year")).isoWeekday(),s.isoWeekday()>4&&(r+=7),s.add(r,kt));return a.diff(o,"week")+1},s.isoWeekday=function(t){return this.$utils().u(t)?this.day()||7:this.day(this.day()%7?t:t-7)};var r=s.startOf;s.startOf=function(t,e){var n=this.$utils(),i=!!n.u(e)||e;return"isoweek"===n.p(t)?i?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):r.bind(this)(t,e)}}))),vt={exports:{}};var xt,bt=(pt||(pt=1,vt.exports=function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,i=/\d\d/,s=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,a={},o=function(t){return(t=+t)+(t>68?1900:2e3)},c=function(t){return function(e){this[t]=+e}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(t){(this.zone||(this.zone={})).offset=function(t){if(!t)return 0;if("Z"===t)return 0;var e=t.match(/([+-]|\d\d)/g),n=60*e[1]+(+e[2]||0);return 0===n?0:"+"===e[0]?-n:n}(t)}],d=function(t){var e=a[t];return e&&(e.indexOf?e:e.s.concat(e.f))},u=function(t,e){var n,i=a.meridiem;if(i){for(var s=1;s<=24;s+=1)if(t.indexOf(i(s,0,e))>-1){n=s>12;break}}else n=t===(e?"pm":"PM");return n},h={A:[r,function(t){this.afternoon=u(t,!1)}],a:[r,function(t){this.afternoon=u(t,!0)}],Q:[n,function(t){this.month=3*(t-1)+1}],S:[n,function(t){this.milliseconds=100*+t}],SS:[i,function(t){this.milliseconds=10*+t}],SSS:[/\d{3}/,function(t){this.milliseconds=+t}],s:[s,c("seconds")],ss:[s,c("seconds")],m:[s,c("minutes")],mm:[s,c("minutes")],H:[s,c("hours")],h:[s,c("hours")],HH:[s,c("hours")],hh:[s,c("hours")],D:[s,c("day")],DD:[i,c("day")],Do:[r,function(t){var e=a.ordinal,n=t.match(/\d+/);if(this.day=n[0],e)for(var i=1;i<=31;i+=1)e(i).replace(/\[|\]/g,"")===t&&(this.day=i)}],w:[s,c("week")],ww:[i,c("week")],M:[s,c("month")],MM:[i,c("month")],MMM:[r,function(t){var e=d("months"),n=(d("monthsShort")||e.map(function(t){return t.slice(0,3)})).indexOf(t)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[r,function(t){var e=d("months").indexOf(t)+1;if(e<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,c("year")],YY:[i,function(t){this.year=o(t)}],YYYY:[/\d{4}/,c("year")],Z:l,ZZ:l};function f(n){var i,s;i=n,s=a&&a.formats;for(var r=(n=i.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(e,n,i){var r=i&&i.toUpperCase();return n||s[i]||t[i]||s[r].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(t,e,n){return e||n.slice(1)})})).match(e),o=r.length,c=0;c<o;c+=1){var l=r[c],d=h[l],u=d&&d[0],f=d&&d[1];r[c]=f?{regex:u,parser:f}:l.replace(/^\[|\]$/g,"")}return function(t){for(var e={},n=0,i=0;n<o;n+=1){var s=r[n];if("string"==typeof s)i+=s.length;else{var a=s.regex,c=s.parser,l=t.slice(i),d=a.exec(l)[0];c.call(e,d),t=t.replace(d,"")}}return function(t){var e=t.afternoon;if(void 0!==e){var n=t.hours;e?n<12&&(t.hours+=12):12===n&&(t.hours=0),delete t.afternoon}}(e),e}}return function(t,e,n){n.p.customParseFormat=!0,t&&t.parseTwoDigitYear&&(o=t.parseTwoDigitYear);var i=e.prototype,s=i.parse;i.parse=function(t){var e=t.date,i=t.utc,r=t.args;this.$u=i;var o=r[1];if("string"==typeof o){var c=!0===r[2],l=!0===r[3],d=c||l,u=r[2];l&&(u=r[2]),a=this.$locale(),!c&&u&&(a=n.Ls[u]),this.$d=function(t,e,n,i){try{if(["x","X"].indexOf(e)>-1)return new Date(("X"===e?1e3:1)*t);var s=f(e)(t),r=s.year,a=s.month,o=s.day,c=s.hours,l=s.minutes,d=s.seconds,u=s.milliseconds,h=s.zone,m=s.week,y=new Date,k=o||(r||a?1:y.getDate()),p=r||y.getFullYear(),g=0;r&&!a||(g=a>0?a-1:y.getMonth());var v,x=c||0,b=l||0,T=d||0,w=u||0;return h?new Date(Date.UTC(p,g,k,x,b,T,w+60*h.offset*1e3)):n?new Date(Date.UTC(p,g,k,x,b,T,w)):(v=new Date(p,g,k,x,b,T,w),m&&(v=i(v).week(m).toDate()),v)}catch(t){return new Date("")}}(e,o,i,n),this.init(),u&&!0!==u&&(this.$L=this.locale(u).$L),d&&e!=this.format(o)&&(this.$d=new Date("")),a={}}else if(o instanceof Array)for(var h=o.length,m=1;m<=h;m+=1){r[1]=o[m-1];var y=n.apply(this,r);if(y.isValid()){this.$d=y.$d,this.$L=y.$L,this.init();break}m===h&&(this.$d=new Date(""))}else s.call(this,t)}}}()),vt.exports),Tt=k(bt),wt={exports:{}};var $t,_t=(xt||(xt=1,wt.exports=function(t,e){var n=e.prototype,i=n.format;n.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return i.bind(this)(t);var s=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(t){switch(t){case"Q":return Math.ceil((e.$M+1)/3);case"Do":return n.ordinal(e.$D);case"gggg":return e.weekYear();case"GGGG":return e.isoWeekYear();case"wo":return n.ordinal(e.week(),"W");case"w":case"ww":return s.s(e.week(),"w"===t?1:2,"0");case"W":case"WW":return s.s(e.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return s.s(String(0===e.$H?24:e.$H),"k"===t?1:2,"0");case"X":return Math.floor(e.$d.getTime()/1e3);case"x":return e.$d.getTime();case"z":return"["+e.offsetName()+"]";case"zzz":return"["+e.offsetName("long")+"]";default:return t}});return i.bind(this)(r)}}),wt.exports),Dt=k(_t),Mt={exports:{}};var St=($t||($t=1,Mt.exports=function(){var t,e,n=1e3,i=6e4,s=36e5,r=864e5,a=31536e6,o=2628e6,c=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,d={years:a,months:o,days:r,hours:s,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},u=function(t){return t instanceof g},h=function(t,e,n){return new g(t,n,e.$l)},f=function(t){return e.p(t)+"s"},m=function(t){return t<0},y=function(t){return m(t)?Math.ceil(t):Math.floor(t)},k=function(t){return Math.abs(t)},p=function(t,e){return t?m(t)?{negative:!0,format:""+k(t)+e}:{negative:!1,format:""+t+e}:{negative:!1,format:""}},g=function(){function m(t,e,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),e)return h(t*d[f(e)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach(function(e){i.$d[f(e)]=t[e]}),this.calMilliseconds(),this;if("string"==typeof t){var s=t.match(c);if(s){var r=s.slice(2).map(function(t){return null!=t?Number(t):0});return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var k=m.prototype;return k.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce(function(e,n){return e+(t.$d[n]||0)*d[n]},0)},k.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=y(t/a),t%=a,this.$d.months=y(t/o),t%=o,this.$d.days=y(t/r),t%=r,this.$d.hours=y(t/s),t%=s,this.$d.minutes=y(t/i),t%=i,this.$d.seconds=y(t/n),t%=n,this.$d.milliseconds=t},k.toISOString=function(){var t=p(this.$d.years,"Y"),e=p(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=p(n,"D"),s=p(this.$d.hours,"H"),r=p(this.$d.minutes,"M"),a=this.$d.seconds||0;this.$d.milliseconds&&(a+=this.$d.milliseconds/1e3,a=Math.round(1e3*a)/1e3);var o=p(a,"S"),c=t.negative||e.negative||i.negative||s.negative||r.negative||o.negative,l=s.format||r.format||o.format?"T":"",d=(c?"-":"")+"P"+t.format+e.format+i.format+l+s.format+r.format+o.format;return"P"===d||"-P"===d?"P0D":d},k.toJSON=function(){return this.toISOString()},k.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return n.replace(l,function(t,e){return e||String(i[t])})},k.as=function(t){return this.$ms/d[f(t)]},k.get=function(t){var e=this.$ms,n=f(t);return"milliseconds"===n?e%=1e3:e="weeks"===n?y(e/d[n]):this.$d[n],e||0},k.add=function(t,e,n){var i;return i=e?t*d[f(e)]:u(t)?t.$ms:h(t,this).$ms,h(this.$ms+i*(n?-1:1),this)},k.subtract=function(t,e){return this.add(t,e,!0)},k.locale=function(t){var e=this.clone();return e.$l=t,e},k.clone=function(){return h(this.$ms,this)},k.humanize=function(e){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!e)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},m}(),v=function(t,e,n){return t.add(e.years()*n,"y").add(e.months()*n,"M").add(e.days()*n,"d").add(e.hours()*n,"h").add(e.minutes()*n,"m").add(e.seconds()*n,"s").add(e.milliseconds()*n,"ms")};return function(n,i,s){t=s,e=s().$utils(),s.duration=function(t,e){var n=s.locale();return h(t,{$l:n},e)},s.isDuration=u;var r=i.prototype.add,a=i.prototype.subtract;i.prototype.add=function(t,e){return u(t)?v(this,t,1):r.bind(this)(t,e)},i.prototype.subtract=function(t,e){return u(t)?v(this,t,-1):a.bind(this)(t,e)}}}()),Mt.exports),Ct=k(St),Et=function(){var t=a(function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},"o"),e=[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],s=[1,28],r=[1,29],o=[1,30],c=[1,31],l=[1,32],d=[1,33],u=[1,34],h=[1,9],f=[1,10],m=[1,11],y=[1,12],k=[1,13],p=[1,14],g=[1,15],v=[1,16],x=[1,19],b=[1,20],T=[1,21],w=[1,22],$=[1,23],_=[1,25],D=[1,35],M={trace:a(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:a(function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.setWeekday("monday");break;case 9:i.setWeekday("tuesday");break;case 10:i.setWeekday("wednesday");break;case 11:i.setWeekday("thursday");break;case 12:i.setWeekday("friday");break;case 13:i.setWeekday("saturday");break;case 14:i.setWeekday("sunday");break;case 15:i.setWeekend("friday");break;case 16:i.setWeekend("saturday");break;case 17:i.setDateFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 18:i.enableInclusiveEndDates(),this.$=r[o].substr(18);break;case 19:i.TopAxis(),this.$=r[o].substr(8);break;case 20:i.setAxisFormat(r[o].substr(11)),this.$=r[o].substr(11);break;case 21:i.setTickInterval(r[o].substr(13)),this.$=r[o].substr(13);break;case 22:i.setExcludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 23:i.setIncludes(r[o].substr(9)),this.$=r[o].substr(9);break;case 24:i.setTodayMarker(r[o].substr(12)),this.$=r[o].substr(12);break;case 27:i.setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 28:this.$=r[o].trim(),i.setAccTitle(this.$);break;case 29:case 30:this.$=r[o].trim(),i.setAccDescription(this.$);break;case 31:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 33:i.addTask(r[o-1],r[o]),this.$="task";break;case 34:this.$=r[o-1],i.setClickEvent(r[o-1],r[o],null);break;case 35:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],r[o]);break;case 36:this.$=r[o-2],i.setClickEvent(r[o-2],r[o-1],null),i.setLink(r[o-2],r[o]);break;case 37:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-2],r[o-1]),i.setLink(r[o-3],r[o]);break;case 38:this.$=r[o-2],i.setClickEvent(r[o-2],r[o],null),i.setLink(r[o-2],r[o-1]);break;case 39:this.$=r[o-3],i.setClickEvent(r[o-3],r[o-1],r[o]),i.setLink(r[o-3],r[o-2]);break;case 40:this.$=r[o-1],i.setLink(r[o-1],r[o]);break;case 41:case 47:this.$=r[o-1]+" "+r[o];break;case 42:case 43:case 45:this.$=r[o-2]+" "+r[o-1]+" "+r[o];break;case 44:case 46:this.$=r[o-3]+" "+r[o-2]+" "+r[o-1]+" "+r[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:s,15:r,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:m,25:y,26:k,27:p,28:g,29:v,30:x,31:b,33:T,35:w,36:$,37:24,38:_,40:D},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:i,14:s,15:r,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:m,25:y,26:k,27:p,28:g,29:v,30:x,31:b,33:T,35:w,36:$,37:24,38:_,40:D},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:a(function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},"parseError"),parse:a(function(t){var e=this,n=[0],i=[],s=[null],r=[],o=this.table,c="",l=0,d=0,u=r.slice.call(arguments,1),h=Object.create(this.lexer),f={yy:{}};for(var m in this.yy)Object.prototype.hasOwnProperty.call(this.yy,m)&&(f.yy[m]=this.yy[m]);h.setInput(t,f.yy),f.yy.lexer=h,f.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var y=h.yylloc;r.push(y);var k=h.options&&h.options.ranges;function p(){var t;return"number"!=typeof(t=i.pop()||h.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(t){n.length=n.length-2*t,s.length=s.length-t,r.length=r.length-t},"popStack"),a(p,"lex");for(var g,v,x,b,T,w,$,_,D={};;){if(v=n[n.length-1],this.defaultActions[v]?x=this.defaultActions[v]:(null==g&&(g=p()),x=o[v]&&o[v][g]),void 0===x||!x.length||!x[0]){var M="";for(T in _=[],o[v])this.terminals_[T]&&T>2&&_.push("'"+this.terminals_[T]+"'");M=h.showPosition?"Parse error on line "+(l+1)+":\n"+h.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(M,{text:h.match,token:this.terminals_[g]||g,line:h.yylineno,loc:y,expected:_})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(x[0]){case 1:n.push(g),s.push(h.yytext),r.push(h.yylloc),n.push(x[1]),g=null,d=h.yyleng,c=h.yytext,l=h.yylineno,y=h.yylloc;break;case 2:if(w=this.productions_[x[1]][1],D.$=s[s.length-w],D._$={first_line:r[r.length-(w||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(w||1)].first_column,last_column:r[r.length-1].last_column},k&&(D._$.range=[r[r.length-(w||1)].range[0],r[r.length-1].range[1]]),void 0!==(b=this.performAction.apply(D,[c,d,l,f.yy,x[1],s,r].concat(u))))return b;w&&(n=n.slice(0,-1*w*2),s=s.slice(0,-1*w),r=r.slice(0,-1*w)),n.push(this.productions_[x[1]][0]),s.push(D.$),r.push(D._$),$=o[n[n.length-2]][n[n.length-1]],n.push($);break;case 3:return!0}}return!0},"parse")},S=function(){return{EOF:1,parseError:a(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:a(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:a(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:a(function(t){this.unput(this.match.slice(t))},"less"),pastInput:a(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:a(function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var t=this.next();return t||this.lex()},"lex"),begin:a(function(t){this.conditionStack.push(t)},"begin"),popState:a(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:a(function(t){this.begin(t)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(t,e,n,i){switch(n){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}}();function C(){this.yy={}}return M.lexer=S,a(C,"Parser"),C.prototype=M,M.Parser=C,new C}();Et.parser=Et;var Yt=Et;d.extend(gt),d.extend(Tt),d.extend(Dt);var At,Lt,It={friday:5,saturday:6},Ot="",Ft="",Wt=void 0,Pt="",Nt=[],jt=[],zt=new Map,Ht=[],Bt=[],Rt="",Gt="",Vt=["active","done","crit","milestone","vert"],Ut=[],Zt="",qt=!1,Xt=!1,Qt="sunday",Jt="saturday",Kt=0,te=a(function(){Ht=[],Bt=[],Rt="",Ut=[],Oe=0,At=void 0,Lt=void 0,Ne=[],Ot="",Ft="",Gt="",Wt=void 0,Pt="",Nt=[],jt=[],qt=!1,Xt=!1,Kt=0,zt=new Map,Zt="",m(),Qt="sunday",Jt="saturday"},"clear"),ee=a(function(t){Zt=t},"setDiagramId"),ne=a(function(t){Ft=t},"setAxisFormat"),ie=a(function(){return Ft},"getAxisFormat"),se=a(function(t){Wt=t},"setTickInterval"),re=a(function(){return Wt},"getTickInterval"),ae=a(function(t){Pt=t},"setTodayMarker"),oe=a(function(){return Pt},"getTodayMarker"),ce=a(function(t){Ot=t},"setDateFormat"),le=a(function(){qt=!0},"enableInclusiveEndDates"),de=a(function(){return qt},"endDatesAreInclusive"),ue=a(function(){Xt=!0},"enableTopAxis"),he=a(function(){return Xt},"topAxisEnabled"),fe=a(function(t){Gt=t},"setDisplayMode"),me=a(function(){return Gt},"getDisplayMode"),ye=a(function(){return Ot},"getDateFormat"),ke=a((t,e)=>{const n=e.toLowerCase().split(/[\s,]+/).filter(t=>""!==t);return[...new Set([...t,...n])]},"mergeTokens"),pe=a(function(t){Nt=ke(Nt,t)},"setIncludes"),ge=a(function(){return Nt},"getIncludes"),ve=a(function(t){jt=ke(jt,t)},"setExcludes"),xe=a(function(){return jt},"getExcludes"),be=a(function(){return zt},"getLinks"),Te=a(function(t){Rt=t,Ht.push(t)},"addSection"),we=a(function(){return Ht},"getSections"),$e=a(function(){let t=Re();let e=0;for(;!t&&e<10;)t=Re(),e++;return Bt=Ne},"getTasks"),_e=a(function(t,e,n,i){const s=t.format(e.trim()),r=t.format("YYYY-MM-DD");return!i.includes(s)&&!i.includes(r)&&(!(!n.includes("weekends")||t.isoWeekday()!==It[Jt]&&t.isoWeekday()!==It[Jt]+1)||(!!n.includes(t.format("dddd").toLowerCase())||(n.includes(s)||n.includes(r))))},"isInvalidDate"),De=a(function(t){Qt=t},"setWeekday"),Me=a(function(){return Qt},"getWeekday"),Se=a(function(t){Jt=t},"setWeekend"),Ce=a(function(t,e,n,i){if(!n.length||t.manualEndTime)return;let s,r;s=t.startTime instanceof Date?d(t.startTime):d(t.startTime,e,!0),s=s.add(1,"d"),r=t.endTime instanceof Date?d(t.endTime):d(t.endTime,e,!0);const[a,o]=Ee(s,r,e,n,i);t.endTime=a.toDate(),t.renderEndTime=o},"checkTaskDates"),Ee=a(function(t,e,n,i,s){let r=!1,a=null;const o=e.add(1e4,"d");for(;t<=e;){if(r||(a=e.toDate()),r=_e(t,n,i,s),r&&(e=e.add(1,"d"))>o)throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");t=t.add(1,"d")}return[e,a]},"fixTaskDates"),Ye=a(function(t,e){u.warn(`Gantt: the "${t}" statement references unknown task id(s): ${e.join(", ")}. Make sure the referenced tasks exist and declare an id. Milestones need both an id and a duration, e.g. "Milestone :milestone, m1, 2023-01-01, 0d".`)},"warnAboutUnknownTaskIds"),Ae=a(function(t,e,n){n=n.trim();if(a(t=>{const e=t.trim();return"x"===e||"X"===e},"isTimestampFormat")(e)&&/^\d+$/.test(n))return new Date(Number(n));const i=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(null!==i){let t=null;const e=[],n=i.groups.ids.split(" ").filter(t=>""!==t);for(const i of n){const n=He(i);void 0!==n?(!t||n.endTime>t.endTime)&&(t=n):e.push(i)}if(e.length>0&&Ye("after",e),t)return t.endTime;const s=new Date;return s.setHours(0,0,0,0),s}let s=d(n,e.trim(),!0);if(s.isValid())return s.toDate();{u.debug("Invalid date:"+n),u.debug("With date format:"+e.trim());const t=new Date(n);if(void 0===t||isNaN(t.getTime())||t.getFullYear()<-1e4||t.getFullYear()>1e4)throw new Error("Invalid date:"+n);return t}},"getStartDate"),Le=a(function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),Ie=a(function(t,e,n,i=!1){n=n.trim();const s=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(null!==s){let t=null;const e=[],n=s.groups.ids.split(" ").filter(t=>""!==t);for(const i of n){const n=He(i);void 0!==n?(!t||n.startTime<t.startTime)&&(t=n):e.push(i)}if(e.length>0&&Ye("until",e),t)return t.startTime;const i=new Date;return i.setHours(0,0,0,0),i}let r=d(n,e.trim(),!0);if(r.isValid())return i&&(r=r.add(1,"d")),r.toDate();let a=d(t);const[o,c]=Le(n);if(Number.isNaN(o))u.warn(`Gantt: "${n}" is neither a valid date for the "${e.trim()}" date format nor a valid duration (e.g. "3d"), so it is ignored and the task gets a zero duration. Milestones need a duration too, e.g. "Milestone :milestone, m1, 2023-01-01, 0d".`);else{const t=a.add(o,c);t.isValid()&&(a=t)}return a.toDate()},"getEndDate"),Oe=0,Fe=a(function(t){return void 0===t?"task"+(Oe+=1):t},"parseId"),We=a(function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),s={};Je(i,s,Vt);for(let t=0;t<i.length;t++)i[t]=i[t].trim();let r="";switch(i.length){case 1:s.id=Fe(),s.startTime=t.endTime,r=i[0];break;case 2:s.id=Fe(),s.startTime=Ae(void 0,Ot,i[0]),r=i[1];break;case 3:s.id=Fe(i[0]),s.startTime=Ae(void 0,Ot,i[1]),r=i[2]}return r&&(s.endTime=Ie(s.startTime,Ot,r,qt),s.manualEndTime=d(r,"YYYY-MM-DD",!0).isValid(),Ce(s,Ot,jt,Nt)),s},"compileData"),Pe=a(function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),s={};Je(i,s,Vt);for(let t=0;t<i.length;t++)i[t]=i[t].trim();switch(i.length){case 1:s.id=Fe(),s.startTime={type:"prevTaskEnd",id:t},s.endTime={data:i[0]};break;case 2:s.id=Fe(),s.startTime={type:"getStartDate",startData:i[0]},s.endTime={data:i[1]};break;case 3:s.id=Fe(i[0]),s.startTime={type:"getStartDate",startData:i[1]},s.endTime={data:i[2]}}return s},"parseData"),Ne=[],je={},ze=a(function(t,e){const n={section:Rt,type:Rt,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=Pe(Lt,e);n.raw.startTime=i.startTime,n.raw.endTime=i.endTime,n.id=i.id,n.prevTaskId=Lt,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,n.vert=i.vert,n.vert?n.order=-1:(n.order=Kt,Kt++);const s=Ne.push(n);Lt=n.id,je[n.id]=s-1},"addTask"),He=a(function(t){const e=je[t];return Ne[e]},"findTaskById"),Be=a(function(t,e){const n={section:Rt,type:Rt,description:t,task:t,classes:[]},i=We(At,e);n.startTime=i.startTime,n.endTime=i.endTime,n.id=i.id,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,n.vert=i.vert,At=n,Bt.push(n)},"addTaskOrg"),Re=a(function(){const t=a(function(t){const e=Ne[t];let n="";switch(Ne[t].raw.startTime.type){case"prevTaskEnd":{const t=He(e.prevTaskId);e.startTime=t.endTime;break}case"getStartDate":n=Ae(void 0,Ot,Ne[t].raw.startTime.startData),n&&(Ne[t].startTime=n)}return Ne[t].startTime&&(Ne[t].endTime=Ie(Ne[t].startTime,Ot,Ne[t].raw.endTime.data,qt),Ne[t].endTime&&(Ne[t].processed=!0,Ne[t].manualEndTime=d(Ne[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Ce(Ne[t],Ot,jt,Nt))),Ne[t].processed},"compileTask");let e=!0;for(const[n,i]of Ne.entries())t(n),e=e&&i.processed;return e},"compileTasks"),Ge=a(function(t,e){let n=e;"loose"!==o().securityLevel&&(n=f.sanitizeUrl(e)),t.split(",").forEach(function(t){void 0!==He(t)&&(Ze(t,()=>{window.open(n,"_self")}),zt.set(t,n))}),Ve(t,"clickable")},"setLink"),Ve=a(function(t,e){t.split(",").forEach(function(t){let n=He(t);void 0!==n&&n.classes.push(e)})},"setClass"),Ue=a(function(t,e,n){if("loose"!==o().securityLevel)return;if(void 0===e)return;let i=[];if("string"==typeof n){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<i.length;t++){let e=i[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),i[t]=e}}0===i.length&&i.push(t),void 0!==He(t)&&Ze(t,()=>{y.runFunc(e,...i)})},"setClickFun"),Ze=a(function(t,e){Ut.push(function(){const n=Zt?`${Zt}-${t}`:t,i=document.querySelector(`[id="${n}"]`);null!==i&&i.addEventListener("click",function(){e()})},function(){const n=Zt?`${Zt}-${t}`:t,i=document.querySelector(`[id="${n}-text"]`);null!==i&&i.addEventListener("click",function(){e()})})},"pushFun"),qe=a(function(t,e,n){t.split(",").forEach(function(t){Ue(t,e,n)}),Ve(t,"clickable")},"setClickEvent"),Xe=a(function(t){Ut.forEach(function(e){e(t)})},"bindFunctions"),Qe={getConfig:a(()=>o().gantt,"getConfig"),clear:te,setDateFormat:ce,getDateFormat:ye,enableInclusiveEndDates:le,endDatesAreInclusive:de,enableTopAxis:ue,topAxisEnabled:he,setAxisFormat:ne,getAxisFormat:ie,setTickInterval:se,getTickInterval:re,setTodayMarker:ae,getTodayMarker:oe,setAccTitle:r,getAccTitle:s,setDiagramTitle:i,getDiagramTitle:n,setDiagramId:ee,setDisplayMode:fe,getDisplayMode:me,setAccDescription:e,getAccDescription:t,addSection:Te,getSections:we,getTasks:$e,addTask:ze,findTaskById:He,addTaskOrg:Be,setIncludes:pe,getIncludes:ge,setExcludes:ve,getExcludes:xe,setClickEvent:qe,setLink:Ge,getLinks:be,bindFunctions:Xe,parseDuration:Le,isInvalidDate:_e,setWeekday:De,getWeekday:Me,setWeekend:Se};function Je(t,e,n){let i=!0;for(;i;)i=!1,n.forEach(function(n){const s=new RegExp("^\\s*"+n+"\\s*$");t[0].match(s)&&(e[n]=!0,t.shift(1),i=!0)})}a(Je,"getTaskTags"),d.extend(Ct);var Ke,tn=a(function(){u.debug("Something is calling, setConf, remove the call")},"setConf"),en={monday:S,tuesday:M,wednesday:D,thursday:_,friday:$,saturday:w,sunday:T},nn=a((t,e)=>{let n=[...t].map(()=>-1/0),i=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),s=0;for(const t of i)for(let i=0;i<n.length;i++)if(t.startTime>=n[i]){n[i]=t.endTime,t.order=i+e,i>s&&(s=i);break}return s},"getMaxIntersections"),sn=1e4,rn={parser:Yt,db:Qe,renderer:{setConf:tn,draw:a(function(t,e,n,i){const s=o().gantt;i.db.setDiagramId(e);const r=o().securityLevel;let f;"sandbox"===r&&(f=c("#i"+e));const m=c("sandbox"===r?f.nodes()[0].contentDocument.body:"body"),y="sandbox"===r?f.nodes()[0].contentDocument:document,k=y.getElementById(e);void 0===(Ke=k.parentElement.offsetWidth)&&(Ke=1200),void 0!==s.useWidth&&(Ke=s.useWidth);const T=i.db.getTasks(),w=T.filter(t=>!t.vert);let $=[];for(const t of w)$.push(t.type);$=B($);const _={};let D=2*s.topPadding;if("compact"===i.db.getDisplayMode()||"compact"===s.displayMode){const t={};for(const e of w)void 0===t[e.section]?t[e.section]=[e]:t[e.section].push(e);let e=0;for(const n of Object.keys(t)){const i=nn(t[n],e)+1;e+=i,D+=i*(s.barHeight+s.barGap),_[n]=i}}else{D+=w.length*(s.barHeight+s.barGap);for(const t of $)_[t]=w.filter(e=>e.type===t).length}k.setAttribute("viewBox","0 0 "+Ke+" "+D);const M=m.select(`[id="${e}"]`),S=p().domain([g(T,function(t){return t.startTime}),v(T,function(t){return t.endTime})]).rangeRound([0,Ke-s.leftPadding-s.rightPadding]);function O(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:n<i&&(s=-1),s}function F(t,e,n){const r=s.barHeight,a=r+s.barGap,o=s.topPadding,c=s.leftPadding,l=I().domain([0,$.length]).range(["#00B9FA","#F95002"]).interpolate(rt);P(a,o,c,e,n,t,i.db.getExcludes(),i.db.getIncludes()),j(c,o,e,n),W(t,a,o,c,r,l,e),z(a,o),H(c,o,e,n)}function W(t,n,r,a,l,d,u){t.sort((t,e)=>t.vert===e.vert?0:t.vert?1:-1);const h=t.filter(t=>!t.vert),f=[...new Set(h.map(t=>t.order))].map(t=>h.find(e=>e.order===t));M.append("g").selectAll("rect").data(f).enter().append("rect").attr("x",0).attr("y",function(t,e){return t.order*n+r-2}).attr("width",function(){return u-s.rightPadding/2}).attr("height",n).attr("class",function(t){for(const[e,n]of $.entries())if(t.type===n)return"section section"+e%s.numberSectionStyles;return"section section0"}).enter();const m=M.append("g").selectAll("rect").data(t).enter(),y=i.db.getLinks();m.append("rect").attr("id",function(t){return e+"-"+t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?S(t.startTime)+a+.5*(S(t.endTime)-S(t.startTime))-.5*l:S(t.startTime)+a}).attr("y",function(t,e){return e=t.order,t.vert?s.gridLineStartPadding:e*n+r}).attr("width",function(t){return t.milestone?l:t.vert?.08*l:S(t.renderEndTime||t.endTime)-S(t.startTime)}).attr("height",function(t){return t.vert?h.length*(s.barHeight+s.barGap)+2*s.barHeight:l}).attr("transform-origin",function(t,e){return e=t.order,(S(t.startTime)+a+.5*(S(t.endTime)-S(t.startTime))).toString()+"px "+(e*n+r+.5*l).toString()+"px"}).attr("class",function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[e,i]of $.entries())t.type===i&&(n=e%s.numberSectionStyles);let i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),t.vert&&(i=" vert "+i),i+=n,i+=" "+e,"task"+i}),m.append("text").attr("id",function(t){return e+"-"+t.id+"-text"}).text(function(t){return t.task}).attr("font-size",s.fontSize).attr("x",function(t){let e=S(t.startTime),n=S(t.renderEndTime||t.endTime);if(t.milestone&&(e+=.5*(S(t.endTime)-S(t.startTime))-.5*l,n=e+l),t.vert)return S(t.startTime)+a;const i=this.getBBox().width;return i>n-e?n+i+1.5*s.leftPadding>u?e+a-5:n+a+5:(n-e)/2+e+a}).attr("y",function(t,e){return t.vert?s.gridLineStartPadding+h.length*(s.barHeight+s.barGap)+60:t.order*n+s.barHeight/2+(s.fontSize/2-2)+r}).attr("text-height",l).attr("class",function(t){const e=S(t.startTime);let n=S(t.endTime);t.milestone&&(n=e+l);const i=this.getBBox().width;let r="";t.classes.length>0&&(r=t.classes.join(" "));let a=0;for(const[e,n]of $.entries())t.type===n&&(a=e%s.numberSectionStyles);let o="";return t.active&&(o=t.crit?"activeCritText"+a:"activeText"+a),t.done?o=t.crit?o+" doneCritText"+a:o+" doneText"+a:t.crit&&(o=o+" critText"+a),t.milestone&&(o+=" milestoneText"),t.vert&&(o+=" vertText"),i>n-e?n+i+1.5*s.leftPadding>u?r+" taskTextOutsideLeft taskTextOutside"+a+" "+o:r+" taskTextOutsideRight taskTextOutside"+a+" "+o+" width-"+i:r+" taskText taskText"+a+" "+o+" width-"+i});if("sandbox"===o().securityLevel){let t;t=c("#i"+e);const n=t.nodes()[0].contentDocument;m.filter(function(t){return y.has(t.id)}).each(function(t){var i=n.querySelector("#"+CSS.escape(e+"-"+t.id)),s=n.querySelector("#"+CSS.escape(e+"-"+t.id+"-text"));const r=i.parentNode;var a=n.createElement("a");a.setAttribute("xlink:href",y.get(t.id)),a.setAttribute("target","_top"),r.appendChild(a),a.appendChild(i),a.appendChild(s)})}}function P(t,n,r,a,o,c,l,h){if(0===l.length&&0===h.length)return;let f,m;for(const{startTime:t,endTime:e}of c)(void 0===f||t<f)&&(f=t),(void 0===m||e>m)&&(m=e);if(!f||!m)return;if(d(m).diff(d(f),"year")>5)return void u.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const y=i.db.getDateFormat(),k=[];let p=null,g=d(f);for(;g.valueOf()<=m;)i.db.isInvalidDate(g,y,l,h)?p?p.end=g:p={start:g,end:g}:p&&(k.push(p),p=null),g=g.add(1,"d");M.append("g").selectAll("rect").data(k).enter().append("rect").attr("id",t=>e+"-exclude-"+t.start.format("YYYY-MM-DD")).attr("x",t=>S(t.start.startOf("day"))+r).attr("y",s.gridLineStartPadding).attr("width",t=>S(t.end.endOf("day"))-S(t.start.startOf("day"))).attr("height",o-n-s.gridLineStartPadding).attr("transform-origin",function(e,n){return(S(e.start)+r+.5*(S(e.end)-S(e.start))).toString()+"px "+(n*t+.5*o).toString()+"px"}).attr("class","exclude-range")}function N(t,e,n,i){if(n<=0||t>e)return 1/0;const s=e-t,r=d.duration({[i??"day"]:n}).asMilliseconds();return r<=0?1/0:Math.ceil(s/r)}function j(t,e,n,r){const a=i.db.getDateFormat(),o=i.db.getAxisFormat();let c;c=o||("D"===a?"%d":s.axisFormat??"%Y-%m-%d");let l=(d=S,ft(3,d)).tickSize(-r+e+s.gridLineStartPadding).tickFormat(x(c));var d;const h=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||s.tickInterval);if(null!==h){const t=parseInt(h[1],10);if(isNaN(t)||t<=0)u.warn(`Invalid tick interval value: "${h[1]}". Skipping custom tick interval.`);else{const e=h[2],n=i.db.getWeekday()||s.weekday,r=S.domain(),a=N(r[0],r[1],t,e);if(a>sn)u.warn(`The tick interval "${t}${e}" would generate ${a} ticks, which exceeds the maximum allowed (10000). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(e){case"millisecond":l.ticks(L.every(t));break;case"second":l.ticks(A.every(t));break;case"minute":l.ticks(Y.every(t));break;case"hour":l.ticks(E.every(t));break;case"day":l.ticks(C.every(t));break;case"week":l.ticks(en[n].every(t));break;case"month":l.ticks(b.every(t))}}}if(M.append("g").attr("class","grid").attr("transform","translate("+t+", "+(r-50)+")").call(l).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||s.topAxis){let n=function(t){return ft(1,t)}(S).tickSize(-r+e+s.gridLineStartPadding).tickFormat(x(c));if(null!==h){const t=parseInt(h[1],10);if(isNaN(t)||t<=0)u.warn(`Invalid tick interval value: "${h[1]}". Skipping custom tick interval.`);else{const e=h[2],r=i.db.getWeekday()||s.weekday,a=S.domain();if(N(a[0],a[1],t,e)<=sn)switch(e){case"millisecond":n.ticks(L.every(t));break;case"second":n.ticks(A.every(t));break;case"minute":n.ticks(Y.every(t));break;case"hour":n.ticks(E.every(t));break;case"day":n.ticks(C.every(t));break;case"week":n.ticks(en[r].every(t));break;case"month":n.ticks(b.every(t))}}}M.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(n).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function z(t,e){let n=0;const i=Object.keys(_).map(t=>[t,_[t]]);M.append("g").selectAll("text").data(i).enter().append(function(t){const e=t[0].split(h.lineBreakRegex),n=-(e.length-1)/2,i=y.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[t,n]of e.entries()){const e=y.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttribute("alignment-baseline","central"),e.setAttribute("x","10"),t>0&&e.setAttribute("dy","1em"),e.textContent=n,i.appendChild(e)}return i}).attr("x",10).attr("y",function(s,r){if(!(r>0))return s[1]*t/2+e;for(let a=0;a<r;a++)return n+=i[r-1][1],s[1]*t/2+n*t+e}).attr("font-size",s.sectionFontSize).attr("class",function(t){for(const[e,n]of $.entries())if(t[0]===n)return"sectionTitle sectionTitle"+e%s.numberSectionStyles;return"sectionTitle"})}function H(t,e,n,r){const a=i.db.getTodayMarker();if("off"===a)return;const o=M.append("g").attr("class","today"),c=new Date,l=o.append("line");l.attr("x1",S(c)+t).attr("x2",S(c)+t).attr("y1",s.titleTopMargin).attr("y2",r-s.titleTopMargin).attr("class","today"),""!==a&&l.attr("style",a.replace(/,/g,";"))}function B(t){const e={},n=[];for(let i=0,s=t.length;i<s;++i)Object.prototype.hasOwnProperty.call(e,t[i])||(e[t[i]]=!0,n.push(t[i]));return n}a(O,"taskCompare"),T.sort(O),F(T,Ke,D),l(M,D,Ke,s.useMaxWidth),M.append("text").text(i.db.getDiagramTitle()).attr("x",Ke/2).attr("y",s.titleTopMargin).attr("class","titleText"),a(F,"makeGantt"),a(W,"drawRects"),a(P,"drawExcludeDays"),a(N,"getEstimatedTickCount"),a(j,"makeGrid"),a(z,"vertLabels"),a(H,"drawToday"),a(B,"checkUnique")},"draw")},styles:a(t=>`\n .mermaid-main-font {\n font-family: ${t.fontFamily};\n }\n\n .exclude-range {\n fill: ${t.excludeBkgColor};\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ${t.sectionBkgColor};\n }\n\n .section2 {\n fill: ${t.sectionBkgColor2};\n }\n\n .section1,\n .section3 {\n fill: ${t.altSectionBkgColor};\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle1 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle2 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle3 {\n fill: ${t.titleColor};\n }\n\n .sectionTitle {\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ${t.gridColor};\n opacity: 0.8;\n shape-rendering: crispEdges;\n }\n\n .grid .tick text {\n font-family: ${t.fontFamily};\n fill: ${t.textColor};\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ${t.todayLineColor};\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideRight {\n fill: ${t.taskTextDarkColor};\n text-anchor: start;\n font-family: ${t.fontFamily};\n }\n\n .taskTextOutsideLeft {\n fill: ${t.taskTextDarkColor};\n text-anchor: end;\n }\n\n\n /* Special case clickable */\n\n .task.clickable {\n cursor: pointer;\n }\n\n .taskText.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ${t.taskTextClickableColor} !important;\n font-weight: bold;\n }\n\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ${t.taskTextColor};\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ${t.taskBkgColor};\n stroke: ${t.taskBorderColor};\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ${t.taskTextOutsideColor};\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ${t.taskTextOutsideColor};\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ${t.activeTaskBkgColor};\n stroke: ${t.activeTaskBorderColor};\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ${t.doneTaskBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n /* Done task text displayed outside the bar sits against the diagram background,\n not against the done-task bar, so it must use the outside/contrast color. */\n .doneText0.taskTextOutsideLeft,\n .doneText0.taskTextOutsideRight,\n .doneText1.taskTextOutsideLeft,\n .doneText1.taskTextOutsideRight,\n .doneText2.taskTextOutsideLeft,\n .doneText2.taskTextOutsideRight,\n .doneText3.taskTextOutsideLeft,\n .doneText3.taskTextOutsideRight {\n fill: ${t.taskTextOutsideColor} !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.critBkgColor};\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.activeTaskBkgColor};\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ${t.critBorderColor};\n fill: ${t.doneTaskBkgColor};\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n /* Done-crit task text outside the bar — same reasoning as doneText above. */\n .doneCritText0.taskTextOutsideLeft,\n .doneCritText0.taskTextOutsideRight,\n .doneCritText1.taskTextOutsideLeft,\n .doneCritText1.taskTextOutsideRight,\n .doneCritText2.taskTextOutsideLeft,\n .doneCritText2.taskTextOutsideRight,\n .doneCritText3.taskTextOutsideLeft,\n .doneCritText3.taskTextOutsideRight {\n fill: ${t.taskTextOutsideColor} !important;\n }\n\n .vert {\n stroke: ${t.vertLineColor};\n }\n\n .vertText {\n font-size: 15px;\n text-anchor: middle;\n fill: ${t.vertLineColor} !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ${t.taskTextDarkColor} !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.titleColor||t.textColor};\n font-family: ${t.fontFamily};\n }\n`,"getStyles")};export{rn as diagram};