@marimo-team/frontend 0.13.7-dev5 → 0.13.7-dev6

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 (93) hide show
  1. package/dist/assets/{ConnectedDataExplorerComponent-D9o6hCFF.js → ConnectedDataExplorerComponent-DYO4zMqc.js} +1 -1
  2. package/dist/assets/{VegaLite-COeaO8XU.js → VegaLite-CNKZYR1c.js} +1 -1
  3. package/dist/assets/{_baseEach-Dipk4Qfw.js → _baseEach-BOi1xMzz.js} +1 -1
  4. package/dist/assets/_baseMap-D2kyVuny.js +1 -0
  5. package/dist/assets/{_baseUniq-CWPdB_dq.js → _baseUniq-EQxa8zIF.js} +1 -1
  6. package/dist/assets/{_createAggregator-CiiGic_e.js → _createAggregator-Dvx5-qYj.js} +1 -1
  7. package/dist/assets/{any-language-editor-Dvmn1QF2.js → any-language-editor-D9fEgqG1.js} +1 -1
  8. package/dist/assets/{architectureDiagram-IEHRJDOE-CU0QICJs.js → architectureDiagram-IEHRJDOE-v-T5Y1-p.js} +1 -1
  9. package/dist/assets/{blockDiagram-JOT3LUYC-CatesY43.js → blockDiagram-JOT3LUYC-gYxXk9dX.js} +1 -1
  10. package/dist/assets/{c4Diagram-VJAJSXHY-C4mhf3Aa.js → c4Diagram-VJAJSXHY-DNHzSaJu.js} +1 -1
  11. package/dist/assets/channel-B7Urz9Qw.js +1 -0
  12. package/dist/assets/{chunk-4BMEZGHF-BIy5YQYp.js → chunk-4BMEZGHF-CNlj2iKt.js} +1 -1
  13. package/dist/assets/{chunk-A2AXSNBT-C_xpJ-hN.js → chunk-A2AXSNBT-CsfD1o8e.js} +1 -1
  14. package/dist/assets/{chunk-AEK57VVT-k8f1agAG.js → chunk-AEK57VVT-DHti-T9J.js} +1 -1
  15. package/dist/assets/{chunk-D6G4REZN--WuDmds7.js → chunk-D6G4REZN-Ca9tCcNK.js} +1 -1
  16. package/dist/assets/{chunk-RZ5BOZE2-B3GqrIXs.js → chunk-RZ5BOZE2-S4AIQ3i1.js} +1 -1
  17. package/dist/assets/{chunk-XZIHB7SX-Cwjiz9xg.js → chunk-XZIHB7SX-BcCHvDgC.js} +1 -1
  18. package/dist/assets/{circle-play-B3IPtL97.js → circle-play-Bc0uRvfe.js} +1 -1
  19. package/dist/assets/classDiagram-GIVACNV2-Dw-L5tk0.js +1 -0
  20. package/dist/assets/classDiagram-v2-COTLJTTW-Dw-L5tk0.js +1 -0
  21. package/dist/assets/clone-2VLlfYv8.js +1 -0
  22. package/dist/assets/{compile-BVb0Xhkk.js → compile-DhiD2OIl.js} +1 -1
  23. package/dist/assets/{dagre-OKDRZEBW-DE3xoxsa.js → dagre-OKDRZEBW-D2Qg0Imy.js} +1 -1
  24. package/dist/assets/{data-editor-B622NT6D.js → data-editor-CG3MBzRh.js} +1 -1
  25. package/dist/assets/{diagram-SSKATNLV-DRGoOkB7.js → diagram-SSKATNLV-DxHLKgNC.js} +1 -1
  26. package/dist/assets/{diagram-VNBRO52H-j3UmS0Ll.js → diagram-VNBRO52H-D6KRYowD.js} +1 -1
  27. package/dist/assets/edit-page-ByAm3pnm.js +8 -0
  28. package/dist/assets/{erDiagram-Q7BY3M3F-DWHoCgAJ.js → erDiagram-Q7BY3M3F-CWDap52H.js} +1 -1
  29. package/dist/assets/{flowDiagram-4HSFHLVR-D_rCoypN.js → flowDiagram-4HSFHLVR-BfiYb11e.js} +1 -1
  30. package/dist/assets/{ganttDiagram-APWFNJXF-CHIT-PcJ.js → ganttDiagram-APWFNJXF-CQV1P3oH.js} +1 -1
  31. package/dist/assets/{gitGraphDiagram-7IBYFJ6S-ErZPaKoV.js → gitGraphDiagram-7IBYFJ6S-BkR4L5qA.js} +1 -1
  32. package/dist/assets/{graph-UJGOb4iX.js → graph-DCc8CUpI.js} +1 -1
  33. package/dist/assets/{home-page-CS3aipva.js → home-page-DBmHL8mR.js} +1 -1
  34. package/dist/assets/{index-CvPoYLZ2.js → index-B6SjbC50.js} +1 -1
  35. package/dist/assets/{index-C546D0ll.js → index-BD18meo4.js} +1 -1
  36. package/dist/assets/index-BbEv2iVN.css +1 -0
  37. package/dist/assets/{index-57xNO1if.js → index-BkczaLMR.js} +1 -1
  38. package/dist/assets/{index-BBlc_oCU.js → index-CDrhBJh5.js} +1 -1
  39. package/dist/assets/{index-KXLr4M13.js → index-CSvNPv2W.js} +1 -1
  40. package/dist/assets/{index-6zO4OfLS.js → index-Cm_Gezq1.js} +1 -1
  41. package/dist/assets/{index-BHXWEyd0.js → index-Cu1YZJKo.js} +1 -1
  42. package/dist/assets/{index-Z1O8-oVl.js → index-Cxi84xou.js} +1 -1
  43. package/dist/assets/{index-CnoBeGie.js → index-D-nbCOVY.js} +1 -1
  44. package/dist/assets/{index-qlq3rtTI.js → index-D0xs4wpq.js} +1 -1
  45. package/dist/assets/index-D25ZVZoz.js +87 -0
  46. package/dist/assets/{index-CDSif2Eo.js → index-DXL9W3IU.js} +1 -1
  47. package/dist/assets/{index-BFUZwCtx.js → index-DZ4-or1K.js} +1 -1
  48. package/dist/assets/{index-De2hEZfe.js → index-Dvf3vz4o.js} +1 -1
  49. package/dist/assets/{index-BKq2imIU.js → index-W7aBJ9gy.js} +1 -1
  50. package/dist/assets/{index-BW8Zm1Wv.js → index-XQJA6HPM.js} +1 -1
  51. package/dist/assets/{index-_0tY9ze_.js → index-c7qrzQb-.js} +1 -1
  52. package/dist/assets/{index-Bl3VaYjI.js → index-vtzfPcuf.js} +1 -1
  53. package/dist/assets/{index-Br-JkW3g.js → index-yYteRT7n.js} +1 -1
  54. package/dist/assets/infoDiagram-PH2N3AL5-D-Eqt5lr.js +1 -0
  55. package/dist/assets/{journeyDiagram-U35MCT3I-DiK9Dw9g.js → journeyDiagram-U35MCT3I-B_5-obIw.js} +1 -1
  56. package/dist/assets/{kanban-definition-NDS4AKOZ-CjYNE8xn.js → kanban-definition-NDS4AKOZ-Bc_pNgjQ.js} +1 -1
  57. package/dist/assets/{layout-BjbDeGc_.js → layout-C4Z666Y5.js} +1 -1
  58. package/dist/assets/{linear-O-YCKOSR.js → linear-WjwPNEQl.js} +1 -1
  59. package/dist/assets/{mermaid-DNVHAxFt.js → mermaid-D2SdoFUx.js} +2 -2
  60. package/dist/assets/{min-W2JRkwEB.js → min-Dg--LZAL.js} +1 -1
  61. package/dist/assets/{mindmap-definition-ALO5MXBD-Ds099Ktp.js → mindmap-definition-ALO5MXBD-DX-U9wBy.js} +1 -1
  62. package/dist/assets/{pieDiagram-IB7DONF6--fIB0xWO.js → pieDiagram-IB7DONF6-BubIPQJh.js} +1 -1
  63. package/dist/assets/{quadrantDiagram-7GDLP6J5-DrySMa8i.js → quadrantDiagram-7GDLP6J5-BHeylzWe.js} +1 -1
  64. package/dist/assets/{radar-MK3ICKWK-BJ67P_5r.js → radar-MK3ICKWK-DRTZUi9y.js} +1 -1
  65. package/dist/assets/{react-plotly-DI7dGePo.js → react-plotly-DKU7Ou4l.js} +1 -1
  66. package/dist/assets/{requirementDiagram-KVF5MWMF-CrGS2s0Z.js → requirementDiagram-KVF5MWMF-BdBi4uFV.js} +1 -1
  67. package/dist/assets/{run-page-Q-WbWUmv.js → run-page-Shivl0hH.js} +1 -1
  68. package/dist/assets/{sankeyDiagram-QLVOVGJD-DKjckX4b.js → sankeyDiagram-QLVOVGJD-D5qRjQPK.js} +1 -1
  69. package/dist/assets/{sequenceDiagram-X6HHIX6F-C6VC8LOY.js → sequenceDiagram-X6HHIX6F-VDxd_dJn.js} +1 -1
  70. package/dist/assets/{slides-component-BqWYp_FB.js → slides-component-C53UoNKL.js} +1 -1
  71. package/dist/assets/{sortBy-MHvTYKSP.js → sortBy-BWYzlL2q.js} +1 -1
  72. package/dist/assets/{stateDiagram-DGXRK772-CTMc5Gvb.js → stateDiagram-DGXRK772-BPFYFRuA.js} +1 -1
  73. package/dist/assets/stateDiagram-v2-YXO3MK2T-CN_rBf9z.js +1 -0
  74. package/dist/assets/{terminal-mbvW7Xk5.js → terminal-BMjRJT_H.js} +1 -1
  75. package/dist/assets/{time-B69UfemB.js → time-J7OIP1Ve.js} +1 -1
  76. package/dist/assets/{timeline-definition-BDJGKUSR-DxC35mOc.js → timeline-definition-BDJGKUSR-DEPlt-q1.js} +1 -1
  77. package/dist/assets/{tracing-DDaw37xD.js → tracing--bLHkrsQ.js} +3 -3
  78. package/dist/assets/{tree-DxEOaINK.js → tree-gS-oXpYe.js} +1 -1
  79. package/dist/assets/{useMarimoWebSocket-xQ57O6MQ.js → useMarimoWebSocket-C7Q2pfmw.js} +3 -3
  80. package/dist/assets/{vega-component-Cw4CVdyb.js → vega-component-DYEjmga7.js} +1 -1
  81. package/dist/assets/{xychartDiagram-VJFVF3MP-DHps7gn-.js → xychartDiagram-VJFVF3MP-D7Uukgqz.js} +1 -1
  82. package/dist/index.html +2 -2
  83. package/package.json +1 -1
  84. package/dist/assets/_baseMap-d7_s2dxj.js +0 -1
  85. package/dist/assets/channel-DqVPz42W.js +0 -1
  86. package/dist/assets/classDiagram-GIVACNV2-CDT_8kPv.js +0 -1
  87. package/dist/assets/classDiagram-v2-COTLJTTW-CDT_8kPv.js +0 -1
  88. package/dist/assets/clone-Cei_W01Q.js +0 -1
  89. package/dist/assets/edit-page-DBO2lLpw.js +0 -8
  90. package/dist/assets/index-BTHBullW.js +0 -87
  91. package/dist/assets/index-KBPV2vq8.css +0 -1
  92. package/dist/assets/infoDiagram-PH2N3AL5-k9F5eQpB.js +0 -1
  93. package/dist/assets/stateDiagram-v2-YXO3MK2T-DnNajpIH.js +0 -1
@@ -1 +1 @@
1
- import{_ as t,g as e,s as n,q as i,p as s,a as r,b as a,c as o,d as c,am as l,l as d,j as u,i as h,y as f,u as y}from"./mermaid-DNVHAxFt.js";import{y as m,ba as k,b2 as p,b1 as g,ci as b,cj as x,ck as T,cl as v,cm as w,cn as _,b0 as D,a$ as $,a_ as S,aQ as C,aZ as E}from"./index-BTHBullW.js";import{s as M}from"./transform-DjHZbYKP.js";import{t as A,m as I,a as Y,i as L}from"./time-B69UfemB.js";import{l as F}from"./linear-O-YCKOSR.js";import"./step-BwsUM5iJ.js";import"./timer-DFzT7np-.js";import"./init-DLRA0X12.js";function W(t){return t}var O=1e-6;function P(t){return"translate("+t+",0)"}function z(t){return"translate(0,"+t+")"}function B(t){return e=>+t(e)}function j(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function N(){return!this.__axis}function H(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?P:z;function h(h){var f=null==i?e.ticks?e.ticks.apply(e,n):e.domain():i,y=null==s?e.tickFormat?e.tickFormat.apply(e,n):W:s,m=Math.max(r,0)+o,k=e.range(),p=+k[0]+c,g=+k[k.length-1]+c,b=(e.bandwidth?j:B)(e.copy(),c),x=h.selection?h.selection():h,T=x.selectAll(".domain").data([null]),v=x.selectAll(".tick").data(f,e).order(),w=v.exit(),_=v.enter().append("g").attr("class","tick"),D=v.select("line"),$=v.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),v=v.merge(_),D=D.merge(_.append("line").attr("stroke","currentColor").attr(d+"2",l*r)),$=$.merge(_.append("text").attr("fill","currentColor").attr(d,l*m).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==x&&(T=T.transition(h),v=v.transition(h),D=D.transition(h),$=$.transition(h),w=w.transition(h).attr("opacity",O).attr("transform",(function(t){return isFinite(t=b(t))?u(t+c):this.getAttribute("transform")})),_.attr("opacity",O).attr("transform",(function(t){var e=this.parentNode.__axis;return u((e&&isFinite(e=e(t))?e:b(t))+c)}))),w.remove(),T.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),v.attr("opacity",1).attr("transform",(function(t){return u(b(t)+c)})),D.attr(d+"2",l*r),$.attr(d,l*m).text(y),x.filter(N).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=b}))}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 G,V,R={exports:{}};const Z=m(G?R.exports:(G=1,R.exports=(V="day",function(t,e,n){var i=function(t){return t.add(4-t.isoWeekday(),V)},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()),V);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,V));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)}})));var U,q={exports:{}};var Q=(U||(U=1,q.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,y=s.week,m=new Date,k=o||(r||a?1:m.getDate()),p=r||m.getFullYear(),g=0;r&&!a||(g=a>0?a-1:m.getMonth());var b,x=c||0,T=l||0,v=d||0,w=u||0;return h?new Date(Date.UTC(p,g,k,x,T,v,w+60*h.offset*1e3)):n?new Date(Date.UTC(p,g,k,x,T,v,w)):(b=new Date(p,g,k,x,T,v,w),y&&(b=i(b).week(y).toDate()),b)}catch(_){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,y=1;y<=h;y+=1){r[1]=o[y-1];var m=n.apply(this,r);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}y===h&&(this.$d=new Date(""))}else s.call(this,t)}}}()),q.exports);const X=m(Q);var J,K={exports:{}};const tt=m(J?K.exports:(J=1,K.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)}}));var et=function(){var e=t((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),n=[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],i=[1,26],s=[1,27],r=[1,28],a=[1,29],o=[1,30],c=[1,31],l=[1,32],d=[1,33],u=[1,34],h=[1,9],f=[1,10],y=[1,11],m=[1,12],k=[1,13],p=[1,14],g=[1,15],b=[1,16],x=[1,19],T=[1,20],v=[1,21],w=[1,22],_=[1,23],D=[1,25],$=[1,35],S={trace:t((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:t((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]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:i,13:s,14:r,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:y,25:m,26:k,27:p,28:g,29:b,30:x,31:T,33:v,35:w,36:_,37:24,38:D,40:$},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:36,11:17,12:i,13:s,14:r,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:y,25:m,26:k,27:p,28:g,29:b,30:x,31:T,33:v,35:w,36:_,37:24,38:D,40:$},e(n,[2,5]),e(n,[2,6]),e(n,[2,17]),e(n,[2,18]),e(n,[2,19]),e(n,[2,20]),e(n,[2,21]),e(n,[2,22]),e(n,[2,23]),e(n,[2,24]),e(n,[2,25]),e(n,[2,26]),e(n,[2,27]),{32:[1,37]},{34:[1,38]},e(n,[2,30]),e(n,[2,31]),e(n,[2,32]),{39:[1,39]},e(n,[2,8]),e(n,[2,9]),e(n,[2,10]),e(n,[2,11]),e(n,[2,12]),e(n,[2,13]),e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),{41:[1,40],43:[1,41]},e(n,[2,4]),e(n,[2,28]),e(n,[2,29]),e(n,[2,33]),e(n,[2,34],{42:[1,42],43:[1,43]}),e(n,[2,40],{41:[1,44]}),e(n,[2,35],{43:[1,45]}),e(n,[2,36]),e(n,[2,38],{42:[1,46]}),e(n,[2,37]),e(n,[2,39])],defaultActions:{},parseError:t((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:t((function(e){var n=this,i=[0],s=[],r=[null],a=[],o=this.table,c="",l=0,d=0,u=a.slice.call(arguments,1),h=Object.create(this.lexer),f={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(f.yy[y]=this.yy[y]);h.setInput(e,f.yy),f.yy.lexer=h,f.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var m=h.yylloc;a.push(m);var k=h.options&&h.options.ranges;function p(){var t;return"number"!=typeof(t=s.pop()||h.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){i.length=i.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),t(p,"lex");for(var g,b,x,T,v,w,_,D,$={};;){if(b=i[i.length-1],this.defaultActions[b]?x=this.defaultActions[b]:(null==g&&(g=p()),x=o[b]&&o[b][g]),void 0===x||!x.length||!x[0]){var S="";for(v in D=[],o[b])this.terminals_[v]&&v>2&&D.push("'"+this.terminals_[v]+"'");S=h.showPosition?"Parse error on line "+(l+1)+":\n"+h.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(S,{text:h.match,token:this.terminals_[g]||g,line:h.yylineno,loc:m,expected:D})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+g);switch(x[0]){case 1:i.push(g),r.push(h.yytext),a.push(h.yylloc),i.push(x[1]),g=null,d=h.yyleng,c=h.yytext,l=h.yylineno,m=h.yylloc;break;case 2:if(w=this.productions_[x[1]][1],$.$=r[r.length-w],$._$={first_line:a[a.length-(w||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(w||1)].first_column,last_column:a[a.length-1].last_column},k&&($._$.range=[a[a.length-(w||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply($,[c,d,l,f.yy,x[1],r,a].concat(u))))return T;w&&(i=i.slice(0,-1*w*2),r=r.slice(0,-1*w),a=a.slice(0,-1*w)),i.push(this.productions_[x[1]][0]),r.push($.$),a.push($._$),_=o[i[i.length-2]][i[i.length-1]],i.push(_);break;case 3:return!0}}return!0}),"parse")},C=function(){return{EOF:1,parseError:t((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:t((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:t((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:t((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:t((function(){return this._more=!0,this}),"more"),reject:t((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:t((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:t((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:t((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:t((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:t((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:t((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:t((function(){var t=this.next();return t||this.lex()}),"lex"),begin:t((function(t){this.conditionStack.push(t)}),"begin"),popState:t((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:t((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:t((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:t((function(t){this.begin(t)}),"pushState"),stateStackSize:t((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:t((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 E(){this.yy={}}return S.lexer=C,t(E,"Parser"),E.prototype=S,S.Parser=E,new E}();et.parser=et;var nt=et;l.extend(Z),l.extend(X),l.extend(tt);var it,st,rt={friday:5,saturday:6},at="",ot="",ct=void 0,lt="",dt=[],ut=[],ht=new Map,ft=[],yt=[],mt="",kt="",pt=["active","done","crit","milestone"],gt=[],bt=!1,xt=!1,Tt="sunday",vt="saturday",wt=0,_t=t((function(){ft=[],yt=[],mt="",gt=[],ne=0,it=void 0,st=void 0,ae=[],at="",ot="",kt="",ct=void 0,lt="",dt=[],ut=[],bt=!1,xt=!1,wt=0,ht=new Map,f(),Tt="sunday",vt="saturday"}),"clear"),Dt=t((function(t){ot=t}),"setAxisFormat"),$t=t((function(){return ot}),"getAxisFormat"),St=t((function(t){ct=t}),"setTickInterval"),Ct=t((function(){return ct}),"getTickInterval"),Et=t((function(t){lt=t}),"setTodayMarker"),Mt=t((function(){return lt}),"getTodayMarker"),At=t((function(t){at=t}),"setDateFormat"),It=t((function(){bt=!0}),"enableInclusiveEndDates"),Yt=t((function(){return bt}),"endDatesAreInclusive"),Lt=t((function(){xt=!0}),"enableTopAxis"),Ft=t((function(){return xt}),"topAxisEnabled"),Wt=t((function(t){kt=t}),"setDisplayMode"),Ot=t((function(){return kt}),"getDisplayMode"),Pt=t((function(){return at}),"getDateFormat"),zt=t((function(t){dt=t.toLowerCase().split(/[\s,]+/)}),"setIncludes"),Bt=t((function(){return dt}),"getIncludes"),jt=t((function(t){ut=t.toLowerCase().split(/[\s,]+/)}),"setExcludes"),Nt=t((function(){return ut}),"getExcludes"),Ht=t((function(){return ht}),"getLinks"),Gt=t((function(t){mt=t,ft.push(t)}),"addSection"),Vt=t((function(){return ft}),"getSections"),Rt=t((function(){let t=ue();let e=0;for(;!t&&e<10;)t=ue(),e++;return yt=ae}),"getTasks"),Zt=t((function(t,e,n,i){return!i.includes(t.format(e.trim()))&&(!(!n.includes("weekends")||t.isoWeekday()!==rt[vt]&&t.isoWeekday()!==rt[vt]+1)||(!!n.includes(t.format("dddd").toLowerCase())||n.includes(t.format(e.trim()))))}),"isInvalidDate"),Ut=t((function(t){Tt=t}),"setWeekday"),qt=t((function(){return Tt}),"getWeekday"),Qt=t((function(t){vt=t}),"setWeekend"),Xt=t((function(t,e,n,i){if(!n.length||t.manualEndTime)return;let s,r;s=t.startTime instanceof Date?l(t.startTime):l(t.startTime,e,!0),s=s.add(1,"d"),r=t.endTime instanceof Date?l(t.endTime):l(t.endTime,e,!0);const[a,o]=Jt(s,r,e,n,i);t.endTime=a.toDate(),t.renderEndTime=o}),"checkTaskDates"),Jt=t((function(t,e,n,i,s){let r=!1,a=null;for(;t<=e;)r||(a=e.toDate()),r=Zt(t,n,i,s),r&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]}),"fixTaskDates"),Kt=t((function(t,e,n){n=n.trim();const i=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(null!==i){let t=null;for(const n of i.groups.ids.split(" ")){let e=le(n);void 0!==e&&(!t||e.endTime>t.endTime)&&(t=e)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let s=l(n,e.trim(),!0);if(s.isValid())return s.toDate();{d.debug("Invalid date:"+n),d.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"),te=t((function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]}),"parseDuration"),ee=t((function(t,e,n,i=!1){n=n.trim();const s=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(null!==s){let t=null;for(const n of s.groups.ids.split(" ")){let e=le(n);void 0!==e&&(!t||e.startTime<t.startTime)&&(t=e)}if(t)return t.startTime;const e=new Date;return e.setHours(0,0,0,0),e}let r=l(n,e.trim(),!0);if(r.isValid())return i&&(r=r.add(1,"d")),r.toDate();let a=l(t);const[o,c]=te(n);if(!Number.isNaN(o)){const t=a.add(o,c);t.isValid()&&(a=t)}return a.toDate()}),"getEndDate"),ne=0,ie=t((function(t){return void 0===t?"task"+(ne+=1):t}),"parseId"),se=t((function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),s={};be(i,s,pt);for(let a=0;a<i.length;a++)i[a]=i[a].trim();let r="";switch(i.length){case 1:s.id=ie(),s.startTime=t.endTime,r=i[0];break;case 2:s.id=ie(),s.startTime=Kt(void 0,at,i[0]),r=i[1];break;case 3:s.id=ie(i[0]),s.startTime=Kt(void 0,at,i[1]),r=i[2]}return r&&(s.endTime=ee(s.startTime,at,r,bt),s.manualEndTime=l(r,"YYYY-MM-DD",!0).isValid(),Xt(s,at,ut,dt)),s}),"compileData"),re=t((function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),s={};be(i,s,pt);for(let r=0;r<i.length;r++)i[r]=i[r].trim();switch(i.length){case 1:s.id=ie(),s.startTime={type:"prevTaskEnd",id:t},s.endTime={data:i[0]};break;case 2:s.id=ie(),s.startTime={type:"getStartDate",startData:i[0]},s.endTime={data:i[1]};break;case 3:s.id=ie(i[0]),s.startTime={type:"getStartDate",startData:i[1]},s.endTime={data:i[2]}}return s}),"parseData"),ae=[],oe={},ce=t((function(t,e){const n={section:mt,type:mt,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=re(st,e);n.raw.startTime=i.startTime,n.raw.endTime=i.endTime,n.id=i.id,n.prevTaskId=st,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,n.order=wt,wt++;const s=ae.push(n);st=n.id,oe[n.id]=s-1}),"addTask"),le=t((function(t){const e=oe[t];return ae[e]}),"findTaskById"),de=t((function(t,e){const n={section:mt,type:mt,description:t,task:t,classes:[]},i=se(it,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,it=n,yt.push(n)}),"addTaskOrg"),ue=t((function(){const e=t((function(t){const e=ae[t];let n="";switch(ae[t].raw.startTime.type){case"prevTaskEnd":{const t=le(e.prevTaskId);e.startTime=t.endTime;break}case"getStartDate":n=Kt(void 0,at,ae[t].raw.startTime.startData),n&&(ae[t].startTime=n)}return ae[t].startTime&&(ae[t].endTime=ee(ae[t].startTime,at,ae[t].raw.endTime.data,bt),ae[t].endTime&&(ae[t].processed=!0,ae[t].manualEndTime=l(ae[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Xt(ae[t],at,ut,dt))),ae[t].processed}),"compileTask");let n=!0;for(const[t,i]of ae.entries())e(t),n=n&&i.processed;return n}),"compileTasks"),he=t((function(t,e){let n=e;"loose"!==o().securityLevel&&(n=h.sanitizeUrl(e)),t.split(",").forEach((function(t){void 0!==le(t)&&(me(t,(()=>{window.open(n,"_self")})),ht.set(t,n))})),fe(t,"clickable")}),"setLink"),fe=t((function(t,e){t.split(",").forEach((function(t){let n=le(t);void 0!==n&&n.classes.push(e)}))}),"setClass"),ye=t((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!==le(t)&&me(t,(()=>{y.runFunc(e,...i)}))}),"setClickFun"),me=t((function(t,e){gt.push((function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",(function(){e()}))}),(function(){const n=document.querySelector(`[id="${t}-text"]`);null!==n&&n.addEventListener("click",(function(){e()}))}))}),"pushFun"),ke=t((function(t,e,n){t.split(",").forEach((function(t){ye(t,e,n)})),fe(t,"clickable")}),"setClickEvent"),pe=t((function(t){gt.forEach((function(e){e(t)}))}),"bindFunctions"),ge={getConfig:t((()=>o().gantt),"getConfig"),clear:_t,setDateFormat:At,getDateFormat:Pt,enableInclusiveEndDates:It,endDatesAreInclusive:Yt,enableTopAxis:Lt,topAxisEnabled:Ft,setAxisFormat:Dt,getAxisFormat:$t,setTickInterval:St,getTickInterval:Ct,setTodayMarker:Et,getTodayMarker:Mt,setAccTitle:a,getAccTitle:r,setDiagramTitle:s,getDiagramTitle:i,setDisplayMode:Wt,getDisplayMode:Ot,setAccDescription:n,getAccDescription:e,addSection:Gt,getSections:Vt,getTasks:Rt,addTask:ce,findTaskById:le,addTaskOrg:de,setIncludes:zt,getIncludes:Bt,setExcludes:jt,getExcludes:Nt,setClickEvent:ke,setLink:he,getLinks:Ht,bindFunctions:pe,parseDuration:te,isInvalidDate:Zt,setWeekday:Ut,getWeekday:qt,setWeekend:Qt};function be(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)}))}t(be,"getTaskTags");var xe,Te=t((function(){d.debug("Something is calling, setConf, remove the call")}),"setConf"),ve={monday:_,tuesday:w,wednesday:v,thursday:T,friday:x,saturday:b,sunday:g},we=t(((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 r of i)for(let t=0;t<n.length;t++)if(r.startTime>=n[t]){n[t]=r.endTime,r.order=t+e,t>s&&(s=t);break}return s}),"getMaxIntersections"),_e={parser:nt,db:ge,renderer:{setConf:Te,draw:t((function(e,n,i,s){const r=o().gantt,a=o().securityLevel;let h;"sandbox"===a&&(h=M("#i"+n));const f=M("sandbox"===a?h.nodes()[0].contentDocument.body:"body"),y="sandbox"===a?h.nodes()[0].contentDocument:document,m=y.getElementById(n);void 0===(xe=m.parentElement.offsetWidth)&&(xe=1200),void 0!==r.useWidth&&(xe=r.useWidth);const g=s.db.getTasks();let b=[];for(const t of g)b.push(t.type);b=N(b);const x={};let T=2*r.topPadding;if("compact"===s.db.getDisplayMode()||"compact"===r.displayMode){const t={};for(const n of g)void 0===t[n.section]?t[n.section]=[n]:t[n.section].push(n);let e=0;for(const n of Object.keys(t)){const i=we(t[n],e)+1;e+=i,T+=i*(r.barHeight+r.barGap),x[n]=i}}else{T+=g.length*(r.barHeight+r.barGap);for(const t of b)x[t]=g.filter((e=>e.type===t)).length}m.setAttribute("viewBox","0 0 "+xe+" "+T);const v=f.select(`[id="${n}"]`),w=A().domain([I(g,(function(t){return t.startTime})),Y(g,(function(t){return t.endTime}))]).rangeRound([0,xe-r.leftPadding-r.rightPadding]);function _(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:n<i&&(s=-1),s}function W(t,e,n){const i=r.barHeight,a=i+r.barGap,o=r.topPadding,c=r.leftPadding,l=F().domain([0,b.length]).range(["#00B9FA","#F95002"]).interpolate(L);P(a,o,c,e,n,t,s.db.getExcludes(),s.db.getIncludes()),z(c,o,e,n),O(t,a,o,c,i,l,e),B(a,o),j(c,o,e,n)}function O(t,e,i,a,c,l,d){const u=[...new Set(t.map((t=>t.order)))].map((e=>t.find((t=>t.order===e))));v.append("g").selectAll("rect").data(u).enter().append("rect").attr("x",0).attr("y",(function(t,n){return t.order*e+i-2})).attr("width",(function(){return d-r.rightPadding/2})).attr("height",e).attr("class",(function(t){for(const[e,n]of b.entries())if(t.type===n)return"section section"+e%r.numberSectionStyles;return"section section0"}));const h=v.append("g").selectAll("rect").data(t).enter(),f=s.db.getLinks();h.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?w(t.startTime)+a+.5*(w(t.endTime)-w(t.startTime))-.5*c:w(t.startTime)+a})).attr("y",(function(t,n){return t.order*e+i})).attr("width",(function(t){return t.milestone?c:w(t.renderEndTime||t.endTime)-w(t.startTime)})).attr("height",c).attr("transform-origin",(function(t,n){return n=t.order,(w(t.startTime)+a+.5*(w(t.endTime)-w(t.startTime))).toString()+"px "+(n*e+i+.5*c).toString()+"px"})).attr("class",(function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[s,a]of b.entries())t.type===a&&(n=s%r.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),i+=n,i+=" "+e,"task"+i})),h.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",r.fontSize).attr("x",(function(t){let e=w(t.startTime),n=w(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(w(t.endTime)-w(t.startTime))-.5*c),t.milestone&&(n=e+c);const i=this.getBBox().width;return i>n-e?n+i+1.5*r.leftPadding>d?e+a-5:n+a+5:(n-e)/2+e+a})).attr("y",(function(t,n){return t.order*e+r.barHeight/2+(r.fontSize/2-2)+i})).attr("text-height",c).attr("class",(function(t){const e=w(t.startTime);let n=w(t.endTime);t.milestone&&(n=e+c);const i=this.getBBox().width;let s="";t.classes.length>0&&(s=t.classes.join(" "));let a=0;for(const[c,l]of b.entries())t.type===l&&(a=c%r.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"),i>n-e?n+i+1.5*r.leftPadding>d?s+" taskTextOutsideLeft taskTextOutside"+a+" "+o:s+" taskTextOutsideRight taskTextOutside"+a+" "+o+" width-"+i:s+" taskText taskText"+a+" "+o+" width-"+i}));if("sandbox"===o().securityLevel){let t;t=M("#i"+n);const e=t.nodes()[0].contentDocument;h.filter((function(t){return f.has(t.id)})).each((function(t){var n=e.querySelector("#"+t.id),i=e.querySelector("#"+t.id+"-text");const s=n.parentNode;var r=e.createElement("a");r.setAttribute("xlink:href",f.get(t.id)),r.setAttribute("target","_top"),s.appendChild(r),r.appendChild(n),r.appendChild(i)}))}}function P(t,e,n,i,a,o,c,u){if(0===c.length&&0===u.length)return;let h,f;for(const{startTime:s,endTime:r}of o)(void 0===h||s<h)&&(h=s),(void 0===f||r>f)&&(f=r);if(!h||!f)return;if(l(f).diff(l(h),"year")>5)return void d.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=s.db.getDateFormat(),m=[];let k=null,p=l(h);for(;p.valueOf()<=f;)s.db.isInvalidDate(p,y,c,u)?k?k.end=p:k={start:p,end:p}:k&&(m.push(k),k=null),p=p.add(1,"d");v.append("g").selectAll("rect").data(m).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return w(t.start)+n})).attr("y",r.gridLineStartPadding).attr("width",(function(t){const e=t.end.add(1,"day");return w(e)-w(t.start)})).attr("height",a-e-r.gridLineStartPadding).attr("transform-origin",(function(e,i){return(w(e.start)+n+.5*(w(e.end)-w(e.start))).toString()+"px "+(i*t+.5*a).toString()+"px"})).attr("class","exclude-range")}function z(t,e,n,i){let a=(o=w,H(3,o)).tickSize(-i+e+r.gridLineStartPadding).tickFormat(k(s.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));var o;const c=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(s.db.getTickInterval()||r.tickInterval);if(null!==c){const t=c[1],e=c[2],n=s.db.getWeekday()||r.weekday;switch(e){case"millisecond":a.ticks(E.every(t));break;case"second":a.ticks(C.every(t));break;case"minute":a.ticks(S.every(t));break;case"hour":a.ticks($.every(t));break;case"day":a.ticks(D.every(t));break;case"week":a.ticks(ve[n].every(t));break;case"month":a.ticks(p.every(t))}}if(v.append("g").attr("class","grid").attr("transform","translate("+t+", "+(i-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),s.db.topAxisEnabled()||r.topAxis){let n=function(t){return H(1,t)}(w).tickSize(-i+e+r.gridLineStartPadding).tickFormat(k(s.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));if(null!==c){const t=c[1],e=c[2],i=s.db.getWeekday()||r.weekday;switch(e){case"millisecond":n.ticks(E.every(t));break;case"second":n.ticks(C.every(t));break;case"minute":n.ticks(S.every(t));break;case"hour":n.ticks($.every(t));break;case"day":n.ticks(D.every(t));break;case"week":n.ticks(ve[i].every(t));break;case"month":n.ticks(p.every(t))}}v.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 B(t,e){let n=0;const i=Object.keys(x).map((t=>[t,x[t]]));v.append("g").selectAll("text").data(i).enter().append((function(t){const e=t[0].split(u.lineBreakRegex),n=-(e.length-1)/2,i=y.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[s,r]of e.entries()){const t=y.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),s>0&&t.setAttribute("dy","1em"),t.textContent=r,i.appendChild(t)}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",r.sectionFontSize).attr("class",(function(t){for(const[e,n]of b.entries())if(t[0]===n)return"sectionTitle sectionTitle"+e%r.numberSectionStyles;return"sectionTitle"}))}function j(t,e,n,i){const a=s.db.getTodayMarker();if("off"===a)return;const o=v.append("g").attr("class","today"),c=new Date,l=o.append("line");l.attr("x1",w(c)+t).attr("x2",w(c)+t).attr("y1",r.titleTopMargin).attr("y2",i-r.titleTopMargin).attr("class","today"),""!==a&&l.attr("style",a.replace(/,/g,";"))}function N(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}t(_,"taskCompare"),g.sort(_),W(g,xe,T),c(v,T,xe,r.useMaxWidth),v.append("text").text(s.db.getDiagramTitle()).attr("x",xe/2).attr("y",r.titleTopMargin).attr("class","titleText"),t(W,"makeGantt"),t(O,"drawRects"),t(P,"drawExcludeDays"),t(z,"makeGrid"),t(B,"vertLabels"),t(j,"drawToday"),t(N,"checkUnique")}),"draw")},styles:t((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\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 .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{_e as diagram};
1
+ import{_ as t,g as e,s as n,q as i,p as s,a as r,b as a,c as o,d as c,am as l,l as d,j as u,i as h,y as f,u as y}from"./mermaid-D2SdoFUx.js";import{y as m,ba as k,b2 as p,b1 as g,ci as b,cj as x,ck as T,cl as v,cm as w,cn as _,b0 as D,a$ as $,a_ as S,aQ as C,aZ as E}from"./index-D25ZVZoz.js";import{s as M}from"./transform-DjHZbYKP.js";import{t as A,m as I,a as Y,i as L}from"./time-J7OIP1Ve.js";import{l as F}from"./linear-WjwPNEQl.js";import"./step-BwsUM5iJ.js";import"./timer-DFzT7np-.js";import"./init-DLRA0X12.js";function W(t){return t}var O=1e-6;function P(t){return"translate("+t+",0)"}function z(t){return"translate(0,"+t+")"}function B(t){return e=>+t(e)}function j(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function N(){return!this.__axis}function H(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?P:z;function h(h){var f=null==i?e.ticks?e.ticks.apply(e,n):e.domain():i,y=null==s?e.tickFormat?e.tickFormat.apply(e,n):W:s,m=Math.max(r,0)+o,k=e.range(),p=+k[0]+c,g=+k[k.length-1]+c,b=(e.bandwidth?j:B)(e.copy(),c),x=h.selection?h.selection():h,T=x.selectAll(".domain").data([null]),v=x.selectAll(".tick").data(f,e).order(),w=v.exit(),_=v.enter().append("g").attr("class","tick"),D=v.select("line"),$=v.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),v=v.merge(_),D=D.merge(_.append("line").attr("stroke","currentColor").attr(d+"2",l*r)),$=$.merge(_.append("text").attr("fill","currentColor").attr(d,l*m).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==x&&(T=T.transition(h),v=v.transition(h),D=D.transition(h),$=$.transition(h),w=w.transition(h).attr("opacity",O).attr("transform",(function(t){return isFinite(t=b(t))?u(t+c):this.getAttribute("transform")})),_.attr("opacity",O).attr("transform",(function(t){var e=this.parentNode.__axis;return u((e&&isFinite(e=e(t))?e:b(t))+c)}))),w.remove(),T.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),v.attr("opacity",1).attr("transform",(function(t){return u(b(t)+c)})),D.attr(d+"2",l*r),$.attr(d,l*m).text(y),x.filter(N).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=b}))}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 G,V,R={exports:{}};const Z=m(G?R.exports:(G=1,R.exports=(V="day",function(t,e,n){var i=function(t){return t.add(4-t.isoWeekday(),V)},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()),V);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,V));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)}})));var U,q={exports:{}};var Q=(U||(U=1,q.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,y=s.week,m=new Date,k=o||(r||a?1:m.getDate()),p=r||m.getFullYear(),g=0;r&&!a||(g=a>0?a-1:m.getMonth());var b,x=c||0,T=l||0,v=d||0,w=u||0;return h?new Date(Date.UTC(p,g,k,x,T,v,w+60*h.offset*1e3)):n?new Date(Date.UTC(p,g,k,x,T,v,w)):(b=new Date(p,g,k,x,T,v,w),y&&(b=i(b).week(y).toDate()),b)}catch(_){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,y=1;y<=h;y+=1){r[1]=o[y-1];var m=n.apply(this,r);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}y===h&&(this.$d=new Date(""))}else s.call(this,t)}}}()),q.exports);const X=m(Q);var J,K={exports:{}};const tt=m(J?K.exports:(J=1,K.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)}}));var et=function(){var e=t((function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n}),"o"),n=[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],i=[1,26],s=[1,27],r=[1,28],a=[1,29],o=[1,30],c=[1,31],l=[1,32],d=[1,33],u=[1,34],h=[1,9],f=[1,10],y=[1,11],m=[1,12],k=[1,13],p=[1,14],g=[1,15],b=[1,16],x=[1,19],T=[1,20],v=[1,21],w=[1,22],_=[1,23],D=[1,25],$=[1,35],S={trace:t((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:t((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]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:i,13:s,14:r,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:y,25:m,26:k,27:p,28:g,29:b,30:x,31:T,33:v,35:w,36:_,37:24,38:D,40:$},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:36,11:17,12:i,13:s,14:r,15:a,16:o,17:c,18:l,19:18,20:d,21:u,22:h,23:f,24:y,25:m,26:k,27:p,28:g,29:b,30:x,31:T,33:v,35:w,36:_,37:24,38:D,40:$},e(n,[2,5]),e(n,[2,6]),e(n,[2,17]),e(n,[2,18]),e(n,[2,19]),e(n,[2,20]),e(n,[2,21]),e(n,[2,22]),e(n,[2,23]),e(n,[2,24]),e(n,[2,25]),e(n,[2,26]),e(n,[2,27]),{32:[1,37]},{34:[1,38]},e(n,[2,30]),e(n,[2,31]),e(n,[2,32]),{39:[1,39]},e(n,[2,8]),e(n,[2,9]),e(n,[2,10]),e(n,[2,11]),e(n,[2,12]),e(n,[2,13]),e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),{41:[1,40],43:[1,41]},e(n,[2,4]),e(n,[2,28]),e(n,[2,29]),e(n,[2,33]),e(n,[2,34],{42:[1,42],43:[1,43]}),e(n,[2,40],{41:[1,44]}),e(n,[2,35],{43:[1,45]}),e(n,[2,36]),e(n,[2,38],{42:[1,46]}),e(n,[2,37]),e(n,[2,39])],defaultActions:{},parseError:t((function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)}),"parseError"),parse:t((function(e){var n=this,i=[0],s=[],r=[null],a=[],o=this.table,c="",l=0,d=0,u=a.slice.call(arguments,1),h=Object.create(this.lexer),f={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(f.yy[y]=this.yy[y]);h.setInput(e,f.yy),f.yy.lexer=h,f.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var m=h.yylloc;a.push(m);var k=h.options&&h.options.ranges;function p(){var t;return"number"!=typeof(t=s.pop()||h.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=n.symbols_[t]||t),t}"function"==typeof f.yy.parseError?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,t((function(t){i.length=i.length-2*t,r.length=r.length-t,a.length=a.length-t}),"popStack"),t(p,"lex");for(var g,b,x,T,v,w,_,D,$={};;){if(b=i[i.length-1],this.defaultActions[b]?x=this.defaultActions[b]:(null==g&&(g=p()),x=o[b]&&o[b][g]),void 0===x||!x.length||!x[0]){var S="";for(v in D=[],o[b])this.terminals_[v]&&v>2&&D.push("'"+this.terminals_[v]+"'");S=h.showPosition?"Parse error on line "+(l+1)+":\n"+h.showPosition()+"\nExpecting "+D.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(S,{text:h.match,token:this.terminals_[g]||g,line:h.yylineno,loc:m,expected:D})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+g);switch(x[0]){case 1:i.push(g),r.push(h.yytext),a.push(h.yylloc),i.push(x[1]),g=null,d=h.yyleng,c=h.yytext,l=h.yylineno,m=h.yylloc;break;case 2:if(w=this.productions_[x[1]][1],$.$=r[r.length-w],$._$={first_line:a[a.length-(w||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(w||1)].first_column,last_column:a[a.length-1].last_column},k&&($._$.range=[a[a.length-(w||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply($,[c,d,l,f.yy,x[1],r,a].concat(u))))return T;w&&(i=i.slice(0,-1*w*2),r=r.slice(0,-1*w),a=a.slice(0,-1*w)),i.push(this.productions_[x[1]][0]),r.push($.$),a.push($._$),_=o[i[i.length-2]][i[i.length-1]],i.push(_);break;case 3:return!0}}return!0}),"parse")},C=function(){return{EOF:1,parseError:t((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:t((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:t((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:t((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:t((function(){return this._more=!0,this}),"more"),reject:t((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:t((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:t((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:t((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:t((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:t((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:t((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:t((function(){var t=this.next();return t||this.lex()}),"lex"),begin:t((function(t){this.conditionStack.push(t)}),"begin"),popState:t((function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:t((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:t((function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:t((function(t){this.begin(t)}),"pushState"),stateStackSize:t((function(){return this.conditionStack.length}),"stateStackSize"),options:{"case-insensitive":!0},performAction:t((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 E(){this.yy={}}return S.lexer=C,t(E,"Parser"),E.prototype=S,S.Parser=E,new E}();et.parser=et;var nt=et;l.extend(Z),l.extend(X),l.extend(tt);var it,st,rt={friday:5,saturday:6},at="",ot="",ct=void 0,lt="",dt=[],ut=[],ht=new Map,ft=[],yt=[],mt="",kt="",pt=["active","done","crit","milestone"],gt=[],bt=!1,xt=!1,Tt="sunday",vt="saturday",wt=0,_t=t((function(){ft=[],yt=[],mt="",gt=[],ne=0,it=void 0,st=void 0,ae=[],at="",ot="",kt="",ct=void 0,lt="",dt=[],ut=[],bt=!1,xt=!1,wt=0,ht=new Map,f(),Tt="sunday",vt="saturday"}),"clear"),Dt=t((function(t){ot=t}),"setAxisFormat"),$t=t((function(){return ot}),"getAxisFormat"),St=t((function(t){ct=t}),"setTickInterval"),Ct=t((function(){return ct}),"getTickInterval"),Et=t((function(t){lt=t}),"setTodayMarker"),Mt=t((function(){return lt}),"getTodayMarker"),At=t((function(t){at=t}),"setDateFormat"),It=t((function(){bt=!0}),"enableInclusiveEndDates"),Yt=t((function(){return bt}),"endDatesAreInclusive"),Lt=t((function(){xt=!0}),"enableTopAxis"),Ft=t((function(){return xt}),"topAxisEnabled"),Wt=t((function(t){kt=t}),"setDisplayMode"),Ot=t((function(){return kt}),"getDisplayMode"),Pt=t((function(){return at}),"getDateFormat"),zt=t((function(t){dt=t.toLowerCase().split(/[\s,]+/)}),"setIncludes"),Bt=t((function(){return dt}),"getIncludes"),jt=t((function(t){ut=t.toLowerCase().split(/[\s,]+/)}),"setExcludes"),Nt=t((function(){return ut}),"getExcludes"),Ht=t((function(){return ht}),"getLinks"),Gt=t((function(t){mt=t,ft.push(t)}),"addSection"),Vt=t((function(){return ft}),"getSections"),Rt=t((function(){let t=ue();let e=0;for(;!t&&e<10;)t=ue(),e++;return yt=ae}),"getTasks"),Zt=t((function(t,e,n,i){return!i.includes(t.format(e.trim()))&&(!(!n.includes("weekends")||t.isoWeekday()!==rt[vt]&&t.isoWeekday()!==rt[vt]+1)||(!!n.includes(t.format("dddd").toLowerCase())||n.includes(t.format(e.trim()))))}),"isInvalidDate"),Ut=t((function(t){Tt=t}),"setWeekday"),qt=t((function(){return Tt}),"getWeekday"),Qt=t((function(t){vt=t}),"setWeekend"),Xt=t((function(t,e,n,i){if(!n.length||t.manualEndTime)return;let s,r;s=t.startTime instanceof Date?l(t.startTime):l(t.startTime,e,!0),s=s.add(1,"d"),r=t.endTime instanceof Date?l(t.endTime):l(t.endTime,e,!0);const[a,o]=Jt(s,r,e,n,i);t.endTime=a.toDate(),t.renderEndTime=o}),"checkTaskDates"),Jt=t((function(t,e,n,i,s){let r=!1,a=null;for(;t<=e;)r||(a=e.toDate()),r=Zt(t,n,i,s),r&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,a]}),"fixTaskDates"),Kt=t((function(t,e,n){n=n.trim();const i=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(null!==i){let t=null;for(const n of i.groups.ids.split(" ")){let e=le(n);void 0!==e&&(!t||e.endTime>t.endTime)&&(t=e)}if(t)return t.endTime;const e=new Date;return e.setHours(0,0,0,0),e}let s=l(n,e.trim(),!0);if(s.isValid())return s.toDate();{d.debug("Invalid date:"+n),d.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"),te=t((function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return null!==e?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]}),"parseDuration"),ee=t((function(t,e,n,i=!1){n=n.trim();const s=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(null!==s){let t=null;for(const n of s.groups.ids.split(" ")){let e=le(n);void 0!==e&&(!t||e.startTime<t.startTime)&&(t=e)}if(t)return t.startTime;const e=new Date;return e.setHours(0,0,0,0),e}let r=l(n,e.trim(),!0);if(r.isValid())return i&&(r=r.add(1,"d")),r.toDate();let a=l(t);const[o,c]=te(n);if(!Number.isNaN(o)){const t=a.add(o,c);t.isValid()&&(a=t)}return a.toDate()}),"getEndDate"),ne=0,ie=t((function(t){return void 0===t?"task"+(ne+=1):t}),"parseId"),se=t((function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),s={};be(i,s,pt);for(let a=0;a<i.length;a++)i[a]=i[a].trim();let r="";switch(i.length){case 1:s.id=ie(),s.startTime=t.endTime,r=i[0];break;case 2:s.id=ie(),s.startTime=Kt(void 0,at,i[0]),r=i[1];break;case 3:s.id=ie(i[0]),s.startTime=Kt(void 0,at,i[1]),r=i[2]}return r&&(s.endTime=ee(s.startTime,at,r,bt),s.manualEndTime=l(r,"YYYY-MM-DD",!0).isValid(),Xt(s,at,ut,dt)),s}),"compileData"),re=t((function(t,e){let n;n=":"===e.substr(0,1)?e.substr(1,e.length):e;const i=n.split(","),s={};be(i,s,pt);for(let r=0;r<i.length;r++)i[r]=i[r].trim();switch(i.length){case 1:s.id=ie(),s.startTime={type:"prevTaskEnd",id:t},s.endTime={data:i[0]};break;case 2:s.id=ie(),s.startTime={type:"getStartDate",startData:i[0]},s.endTime={data:i[1]};break;case 3:s.id=ie(i[0]),s.startTime={type:"getStartDate",startData:i[1]},s.endTime={data:i[2]}}return s}),"parseData"),ae=[],oe={},ce=t((function(t,e){const n={section:mt,type:mt,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=re(st,e);n.raw.startTime=i.startTime,n.raw.endTime=i.endTime,n.id=i.id,n.prevTaskId=st,n.active=i.active,n.done=i.done,n.crit=i.crit,n.milestone=i.milestone,n.order=wt,wt++;const s=ae.push(n);st=n.id,oe[n.id]=s-1}),"addTask"),le=t((function(t){const e=oe[t];return ae[e]}),"findTaskById"),de=t((function(t,e){const n={section:mt,type:mt,description:t,task:t,classes:[]},i=se(it,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,it=n,yt.push(n)}),"addTaskOrg"),ue=t((function(){const e=t((function(t){const e=ae[t];let n="";switch(ae[t].raw.startTime.type){case"prevTaskEnd":{const t=le(e.prevTaskId);e.startTime=t.endTime;break}case"getStartDate":n=Kt(void 0,at,ae[t].raw.startTime.startData),n&&(ae[t].startTime=n)}return ae[t].startTime&&(ae[t].endTime=ee(ae[t].startTime,at,ae[t].raw.endTime.data,bt),ae[t].endTime&&(ae[t].processed=!0,ae[t].manualEndTime=l(ae[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Xt(ae[t],at,ut,dt))),ae[t].processed}),"compileTask");let n=!0;for(const[t,i]of ae.entries())e(t),n=n&&i.processed;return n}),"compileTasks"),he=t((function(t,e){let n=e;"loose"!==o().securityLevel&&(n=h.sanitizeUrl(e)),t.split(",").forEach((function(t){void 0!==le(t)&&(me(t,(()=>{window.open(n,"_self")})),ht.set(t,n))})),fe(t,"clickable")}),"setLink"),fe=t((function(t,e){t.split(",").forEach((function(t){let n=le(t);void 0!==n&&n.classes.push(e)}))}),"setClass"),ye=t((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!==le(t)&&me(t,(()=>{y.runFunc(e,...i)}))}),"setClickFun"),me=t((function(t,e){gt.push((function(){const n=document.querySelector(`[id="${t}"]`);null!==n&&n.addEventListener("click",(function(){e()}))}),(function(){const n=document.querySelector(`[id="${t}-text"]`);null!==n&&n.addEventListener("click",(function(){e()}))}))}),"pushFun"),ke=t((function(t,e,n){t.split(",").forEach((function(t){ye(t,e,n)})),fe(t,"clickable")}),"setClickEvent"),pe=t((function(t){gt.forEach((function(e){e(t)}))}),"bindFunctions"),ge={getConfig:t((()=>o().gantt),"getConfig"),clear:_t,setDateFormat:At,getDateFormat:Pt,enableInclusiveEndDates:It,endDatesAreInclusive:Yt,enableTopAxis:Lt,topAxisEnabled:Ft,setAxisFormat:Dt,getAxisFormat:$t,setTickInterval:St,getTickInterval:Ct,setTodayMarker:Et,getTodayMarker:Mt,setAccTitle:a,getAccTitle:r,setDiagramTitle:s,getDiagramTitle:i,setDisplayMode:Wt,getDisplayMode:Ot,setAccDescription:n,getAccDescription:e,addSection:Gt,getSections:Vt,getTasks:Rt,addTask:ce,findTaskById:le,addTaskOrg:de,setIncludes:zt,getIncludes:Bt,setExcludes:jt,getExcludes:Nt,setClickEvent:ke,setLink:he,getLinks:Ht,bindFunctions:pe,parseDuration:te,isInvalidDate:Zt,setWeekday:Ut,getWeekday:qt,setWeekend:Qt};function be(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)}))}t(be,"getTaskTags");var xe,Te=t((function(){d.debug("Something is calling, setConf, remove the call")}),"setConf"),ve={monday:_,tuesday:w,wednesday:v,thursday:T,friday:x,saturday:b,sunday:g},we=t(((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 r of i)for(let t=0;t<n.length;t++)if(r.startTime>=n[t]){n[t]=r.endTime,r.order=t+e,t>s&&(s=t);break}return s}),"getMaxIntersections"),_e={parser:nt,db:ge,renderer:{setConf:Te,draw:t((function(e,n,i,s){const r=o().gantt,a=o().securityLevel;let h;"sandbox"===a&&(h=M("#i"+n));const f=M("sandbox"===a?h.nodes()[0].contentDocument.body:"body"),y="sandbox"===a?h.nodes()[0].contentDocument:document,m=y.getElementById(n);void 0===(xe=m.parentElement.offsetWidth)&&(xe=1200),void 0!==r.useWidth&&(xe=r.useWidth);const g=s.db.getTasks();let b=[];for(const t of g)b.push(t.type);b=N(b);const x={};let T=2*r.topPadding;if("compact"===s.db.getDisplayMode()||"compact"===r.displayMode){const t={};for(const n of g)void 0===t[n.section]?t[n.section]=[n]:t[n.section].push(n);let e=0;for(const n of Object.keys(t)){const i=we(t[n],e)+1;e+=i,T+=i*(r.barHeight+r.barGap),x[n]=i}}else{T+=g.length*(r.barHeight+r.barGap);for(const t of b)x[t]=g.filter((e=>e.type===t)).length}m.setAttribute("viewBox","0 0 "+xe+" "+T);const v=f.select(`[id="${n}"]`),w=A().domain([I(g,(function(t){return t.startTime})),Y(g,(function(t){return t.endTime}))]).rangeRound([0,xe-r.leftPadding-r.rightPadding]);function _(t,e){const n=t.startTime,i=e.startTime;let s=0;return n>i?s=1:n<i&&(s=-1),s}function W(t,e,n){const i=r.barHeight,a=i+r.barGap,o=r.topPadding,c=r.leftPadding,l=F().domain([0,b.length]).range(["#00B9FA","#F95002"]).interpolate(L);P(a,o,c,e,n,t,s.db.getExcludes(),s.db.getIncludes()),z(c,o,e,n),O(t,a,o,c,i,l,e),B(a,o),j(c,o,e,n)}function O(t,e,i,a,c,l,d){const u=[...new Set(t.map((t=>t.order)))].map((e=>t.find((t=>t.order===e))));v.append("g").selectAll("rect").data(u).enter().append("rect").attr("x",0).attr("y",(function(t,n){return t.order*e+i-2})).attr("width",(function(){return d-r.rightPadding/2})).attr("height",e).attr("class",(function(t){for(const[e,n]of b.entries())if(t.type===n)return"section section"+e%r.numberSectionStyles;return"section section0"}));const h=v.append("g").selectAll("rect").data(t).enter(),f=s.db.getLinks();h.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?w(t.startTime)+a+.5*(w(t.endTime)-w(t.startTime))-.5*c:w(t.startTime)+a})).attr("y",(function(t,n){return t.order*e+i})).attr("width",(function(t){return t.milestone?c:w(t.renderEndTime||t.endTime)-w(t.startTime)})).attr("height",c).attr("transform-origin",(function(t,n){return n=t.order,(w(t.startTime)+a+.5*(w(t.endTime)-w(t.startTime))).toString()+"px "+(n*e+i+.5*c).toString()+"px"})).attr("class",(function(t){let e="";t.classes.length>0&&(e=t.classes.join(" "));let n=0;for(const[s,a]of b.entries())t.type===a&&(n=s%r.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),i+=n,i+=" "+e,"task"+i})),h.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",r.fontSize).attr("x",(function(t){let e=w(t.startTime),n=w(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(w(t.endTime)-w(t.startTime))-.5*c),t.milestone&&(n=e+c);const i=this.getBBox().width;return i>n-e?n+i+1.5*r.leftPadding>d?e+a-5:n+a+5:(n-e)/2+e+a})).attr("y",(function(t,n){return t.order*e+r.barHeight/2+(r.fontSize/2-2)+i})).attr("text-height",c).attr("class",(function(t){const e=w(t.startTime);let n=w(t.endTime);t.milestone&&(n=e+c);const i=this.getBBox().width;let s="";t.classes.length>0&&(s=t.classes.join(" "));let a=0;for(const[c,l]of b.entries())t.type===l&&(a=c%r.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"),i>n-e?n+i+1.5*r.leftPadding>d?s+" taskTextOutsideLeft taskTextOutside"+a+" "+o:s+" taskTextOutsideRight taskTextOutside"+a+" "+o+" width-"+i:s+" taskText taskText"+a+" "+o+" width-"+i}));if("sandbox"===o().securityLevel){let t;t=M("#i"+n);const e=t.nodes()[0].contentDocument;h.filter((function(t){return f.has(t.id)})).each((function(t){var n=e.querySelector("#"+t.id),i=e.querySelector("#"+t.id+"-text");const s=n.parentNode;var r=e.createElement("a");r.setAttribute("xlink:href",f.get(t.id)),r.setAttribute("target","_top"),s.appendChild(r),r.appendChild(n),r.appendChild(i)}))}}function P(t,e,n,i,a,o,c,u){if(0===c.length&&0===u.length)return;let h,f;for(const{startTime:s,endTime:r}of o)(void 0===h||s<h)&&(h=s),(void 0===f||r>f)&&(f=r);if(!h||!f)return;if(l(f).diff(l(h),"year")>5)return void d.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=s.db.getDateFormat(),m=[];let k=null,p=l(h);for(;p.valueOf()<=f;)s.db.isInvalidDate(p,y,c,u)?k?k.end=p:k={start:p,end:p}:k&&(m.push(k),k=null),p=p.add(1,"d");v.append("g").selectAll("rect").data(m).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return w(t.start)+n})).attr("y",r.gridLineStartPadding).attr("width",(function(t){const e=t.end.add(1,"day");return w(e)-w(t.start)})).attr("height",a-e-r.gridLineStartPadding).attr("transform-origin",(function(e,i){return(w(e.start)+n+.5*(w(e.end)-w(e.start))).toString()+"px "+(i*t+.5*a).toString()+"px"})).attr("class","exclude-range")}function z(t,e,n,i){let a=(o=w,H(3,o)).tickSize(-i+e+r.gridLineStartPadding).tickFormat(k(s.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));var o;const c=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(s.db.getTickInterval()||r.tickInterval);if(null!==c){const t=c[1],e=c[2],n=s.db.getWeekday()||r.weekday;switch(e){case"millisecond":a.ticks(E.every(t));break;case"second":a.ticks(C.every(t));break;case"minute":a.ticks(S.every(t));break;case"hour":a.ticks($.every(t));break;case"day":a.ticks(D.every(t));break;case"week":a.ticks(ve[n].every(t));break;case"month":a.ticks(p.every(t))}}if(v.append("g").attr("class","grid").attr("transform","translate("+t+", "+(i-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),s.db.topAxisEnabled()||r.topAxis){let n=function(t){return H(1,t)}(w).tickSize(-i+e+r.gridLineStartPadding).tickFormat(k(s.db.getAxisFormat()||r.axisFormat||"%Y-%m-%d"));if(null!==c){const t=c[1],e=c[2],i=s.db.getWeekday()||r.weekday;switch(e){case"millisecond":n.ticks(E.every(t));break;case"second":n.ticks(C.every(t));break;case"minute":n.ticks(S.every(t));break;case"hour":n.ticks($.every(t));break;case"day":n.ticks(D.every(t));break;case"week":n.ticks(ve[i].every(t));break;case"month":n.ticks(p.every(t))}}v.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 B(t,e){let n=0;const i=Object.keys(x).map((t=>[t,x[t]]));v.append("g").selectAll("text").data(i).enter().append((function(t){const e=t[0].split(u.lineBreakRegex),n=-(e.length-1)/2,i=y.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for(const[s,r]of e.entries()){const t=y.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),s>0&&t.setAttribute("dy","1em"),t.textContent=r,i.appendChild(t)}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",r.sectionFontSize).attr("class",(function(t){for(const[e,n]of b.entries())if(t[0]===n)return"sectionTitle sectionTitle"+e%r.numberSectionStyles;return"sectionTitle"}))}function j(t,e,n,i){const a=s.db.getTodayMarker();if("off"===a)return;const o=v.append("g").attr("class","today"),c=new Date,l=o.append("line");l.attr("x1",w(c)+t).attr("x2",w(c)+t).attr("y1",r.titleTopMargin).attr("y2",i-r.titleTopMargin).attr("class","today"),""!==a&&l.attr("style",a.replace(/,/g,";"))}function N(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}t(_,"taskCompare"),g.sort(_),W(g,xe,T),c(v,T,xe,r.useMaxWidth),v.append("text").text(s.db.getDiagramTitle()).attr("x",xe/2).attr("y",r.titleTopMargin).attr("class","titleText"),t(W,"makeGantt"),t(O,"drawRects"),t(P,"drawExcludeDays"),t(z,"makeGrid"),t(B,"vertLabels"),t(j,"drawToday"),t(N,"checkUnique")}),"draw")},styles:t((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\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 .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{_e as diagram};
@@ -1 +1 @@
1
- import{p as t}from"./chunk-4BMEZGHF-BIy5YQYp.js";import{I as r}from"./chunk-XZIHB7SX-Cwjiz9xg.js";import{_ as e,q as o,p as n,s as a,g as s,a as i,b as c,l as d,c as h,u as m,D as $,y as l,j as g,E as y,F as p,G as u,H as x}from"./mermaid-DNVHAxFt.js";import{p as f}from"./radar-MK3ICKWK-BJ67P_5r.js";import{s as b}from"./transform-DjHZbYKP.js";import"./index-BTHBullW.js";import"./step-BwsUM5iJ.js";import"./_baseEach-Dipk4Qfw.js";import"./_baseUniq-CWPdB_dq.js";import"./min-W2JRkwEB.js";import"./_baseMap-d7_s2dxj.js";import"./clone-Cei_W01Q.js";import"./_createAggregator-CiiGic_e.js";import"./timer-DFzT7np-.js";var w={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},B=u.gitGraph,E=e((()=>y({...B,...p().gitGraph})),"getConfig"),v=new r((()=>{const t=E(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}}));function k(){return x({length:7})}function C(t,r){const e=Object.create(null);return t.reduce(((t,o)=>{const n=r(o);return e[n]||(e[n]=!0,t.push(o)),t}),[])}e(k,"getID"),e(C,"uniqBy");var L=e((function(t){v.records.direction=t}),"setDirection"),T=e((function(t){d.debug("options str",t),t=(t=null==t?void 0:t.trim())||"{}";try{v.records.options=JSON.parse(t)}catch(r){d.error("error while parsing gitGraph options",r.message)}}),"setOptions"),M=e((function(){return v.records.options}),"getOptions"),P=e((function(t){let r=t.msg,e=t.id;const o=t.type;let n=t.tags;d.info("commit",r,e,o,n),d.debug("Entering commit:",r,e,o,n);const a=E();e=g.sanitizeText(e,a),r=g.sanitizeText(r,a),n=null==n?void 0:n.map((t=>g.sanitizeText(t,a)));const s={id:e||v.records.seq+"-"+k(),message:r,seq:v.records.seq++,type:o??w.NORMAL,tags:n??[],parents:null==v.records.head?[]:[v.records.head.id],branch:v.records.currBranch};v.records.head=s,d.info("main branch",a.mainBranchName),v.records.commits.set(s.id,s),v.records.branches.set(v.records.currBranch,s.id),d.debug("in pushCommit "+s.id)}),"commit"),R=e((function(t){let r=t.name;const e=t.order;if(r=g.sanitizeText(r,E()),v.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);v.records.branches.set(r,null!=v.records.head?v.records.head.id:null),v.records.branchConfig.set(r,{name:r,order:e}),G(r),d.debug("in createBranch")}),"branch"),I=e((t=>{let r=t.branch,e=t.id;const o=t.type,n=t.tags,a=E();r=g.sanitizeText(r,a),e&&(e=g.sanitizeText(e,a));const s=v.records.branches.get(v.records.currBranch),i=v.records.branches.get(r),c=s?v.records.commits.get(s):void 0,h=i?v.records.commits.get(i):void 0;if(c&&h&&c.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(v.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===c||!c){const t=new Error(`Incorrect usage of "merge". Current branch (${v.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!v.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===h||!h){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if(c===h){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&v.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw t.hash={text:`merge ${r} ${e} ${o} ${null==n?void 0:n.join(" ")}`,token:`merge ${r} ${e} ${o} ${null==n?void 0:n.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${o} ${null==n?void 0:n.join(" ")}`]},t}const m=i||"",$={id:e||`${v.records.seq}-${k()}`,message:`merged branch ${r} into ${v.records.currBranch}`,seq:v.records.seq++,parents:null==v.records.head?[]:[v.records.head.id,m],branch:v.records.currBranch,type:w.MERGE,customType:o,customId:!!e,tags:n??[]};v.records.head=$,v.records.commits.set($.id,$),v.records.branches.set(v.records.currBranch,$.id),d.debug(v.records.branches),d.debug("in mergeBranch")}),"merge"),A=e((function(t){let r=t.id,e=t.targetId,o=t.tags,n=t.parent;d.debug("Entering cherryPick:",r,e,o);const a=E();if(r=g.sanitizeText(r,a),e=g.sanitizeText(e,a),o=null==o?void 0:o.map((t=>g.sanitizeText(t,a))),n=g.sanitizeText(n,a),!r||!v.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const s=v.records.commits.get(r);if(void 0===s||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(s.parents)||!s.parents.includes(n))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}const i=s.branch;if(s.type===w.MERGE&&!n){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!e||!v.records.commits.has(e)){if(i===v.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=v.records.branches.get(v.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${v.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=v.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${v.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const c={id:v.records.seq+"-"+k(),message:`cherry-picked ${null==s?void 0:s.message} into ${v.records.currBranch}`,seq:v.records.seq++,parents:null==v.records.head?[]:[v.records.head.id,s.id],branch:v.records.currBranch,type:w.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${s.id}${s.type===w.MERGE?`|parent:${n}`:""}`]};v.records.head=c,v.records.commits.set(c.id,c),v.records.branches.set(v.records.currBranch,c.id),d.debug(v.records.branches),d.debug("in cherryPick")}}),"cherryPick"),G=e((function(t){if(t=g.sanitizeText(t,E()),!v.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{v.records.currBranch=t;const r=v.records.branches.get(v.records.currBranch);v.records.head=void 0!==r&&r?v.records.commits.get(r)??null:null}}),"checkout");function O(t,r,e){const o=t.indexOf(r);-1===o?t.push(e):t.splice(o,1,e)}function j(t){const r=t.reduce(((t,r)=>t.seq>r.seq?t:r),t[0]);let e="";t.forEach((function(t){e+=t===r?"\t*":"\t|"}));const o=[e,r.id,r.seq];for(const n in v.records.branches)v.records.branches.get(n)===r.id&&o.push(n);if(d.debug(o.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=v.records.commits.get(r.parents[0]);O(t,r,e),r.parents[1]&&t.push(v.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=v.records.commits.get(r.parents[0]);O(t,r,e)}}j(t=C(t,(t=>t.id)))}e(O,"upsert"),e(j,"prettyPrintCommitHistory");var q=e((function(){d.debug(v.records.commits);j([N()[0]])}),"prettyPrint"),H=e((function(){v.reset(),l()}),"clear"),z=e((function(){return[...v.records.branchConfig.values()].map(((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)})).sort(((t,r)=>(t.order??0)-(r.order??0))).map((({name:t})=>({name:t})))}),"getBranchesAsObjArray"),S=e((function(){return v.records.branches}),"getBranches"),D=e((function(){return v.records.commits}),"getCommits"),N=e((function(){const t=[...v.records.commits.values()];return t.forEach((function(t){d.debug(t.id)})),t.sort(((t,r)=>t.seq-r.seq)),t}),"getCommitsArray"),W={commitType:w,getConfig:E,setDirection:L,setOptions:T,getOptions:M,commit:P,branch:R,merge:I,cherryPick:A,checkout:G,prettyPrint:q,clear:H,getBranchesAsObjArray:z,getBranches:S,getCommits:D,getCommitsArray:N,getCurrentBranch:e((function(){return v.records.currBranch}),"getCurrentBranch"),getDirection:e((function(){return v.records.direction}),"getDirection"),getHead:e((function(){return v.records.head}),"getHead"),setAccTitle:c,getAccTitle:i,getAccDescription:s,setAccDescription:a,setDiagramTitle:n,getDiagramTitle:o},_=e(((r,e)=>{t(r,e),r.dir&&e.setDirection(r.dir);for(const t of r.statements)K(t,e)}),"populate"),K=e(((t,r)=>{const o={Commit:e((t=>r.commit(F(t))),"Commit"),Branch:e((t=>r.branch(U(t))),"Branch"),Merge:e((t=>r.merge(Y(t))),"Merge"),Checkout:e((t=>r.checkout(V(t))),"Checkout"),CherryPicking:e((t=>r.cherryPick(X(t))),"CherryPicking")}[t.$type];o?o(t):d.error(`Unknown statement type: ${t.$type}`)}),"parseStatement"),F=e((t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?w[t.type]:w.NORMAL,tags:t.tags??void 0})),"parseCommit"),U=e((t=>({name:t.name,order:t.order??0})),"parseBranch"),Y=e((t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?w[t.type]:void 0,tags:t.tags??void 0})),"parseMerge"),V=e((t=>t.branch),"parseCheckout"),X=e((t=>{var r;return{id:t.id,targetId:"",tags:0===(null==(r=t.tags)?void 0:r.length)?void 0:t.tags,parent:t.parent}}),"parseCherryPicking"),Z={parse:e((async t=>{const r=await f("gitGraph",t);d.debug(r),_(r,W)}),"parse")},J=h(),Q=null==J?void 0:J.gitGraph,tt=10,rt=40,et=new Map,ot=new Map,nt=new Map,at=[],st=0,it="LR",ct=e((()=>{et.clear(),ot.clear(),nt.clear(),st=0,at=[],it="LR"}),"clear"),dt=e((t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach((t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)})),r}),"drawText"),ht=e((t=>{let r,o,n;return"BT"===it?(o=e(((t,r)=>t<=r),"comparisonFunc"),n=1/0):(o=e(((t,r)=>t>=r),"comparisonFunc"),n=0),t.forEach((t=>{var e,a;const s="TB"===it||"BT"==it?null==(e=ot.get(t))?void 0:e.y:null==(a=ot.get(t))?void 0:a.x;void 0!==s&&o(s,n)&&(r=t,n=s)})),r}),"findClosestParent"),mt=e((t=>{let r="",e=1/0;return t.forEach((t=>{const o=ot.get(t).y;o<=e&&(r=t,e=o)})),r||void 0}),"findClosestParentBT"),$t=e(((t,r,e)=>{let o=e,n=e;const a=[];t.forEach((t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(o=gt(e),n=Math.max(o,n)):a.push(e),yt(e,o)})),o=n,a.forEach((t=>{pt(t,o,e)})),t.forEach((t=>{const e=r.get(t);if(null==e?void 0:e.parents.length){const t=mt(e.parents);o=ot.get(t).y-rt,o<=n&&(n=o);const r=et.get(e.branch).pos,a=o-tt;ot.set(e.id,{x:r,y:a})}}))}),"setParallelBTPos"),lt=e((t=>{var r;const e=ht(t.parents.filter((t=>null!==t)));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);const o=null==(r=ot.get(e))?void 0:r.y;if(void 0===o)throw new Error(`Closest parent position not found for commit ${t.id}`);return o}),"findClosestParentPos"),gt=e((t=>lt(t)+rt),"calculateCommitPosition"),yt=e(((t,r)=>{const e=et.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const o=e.pos,n=r+tt;return ot.set(t.id,{x:o,y:n}),{x:o,y:n}}),"setCommitPosition"),pt=e(((t,r,e)=>{const o=et.get(t.branch);if(!o)throw new Error(`Branch not found for commit ${t.id}`);const n=r+e,a=o.pos;ot.set(t.id,{x:a,y:n})}),"setRootPosition"),ut=e(((t,r,e,o,n,a)=>{if(a===w.HIGHLIGHT)t.append("rect").attr("x",e.x-10).attr("y",e.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${n%8} ${o}-outer`),t.append("rect").attr("x",e.x-6).attr("y",e.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${n%8} ${o}-inner`);else if(a===w.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",10).attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${o}`);else{const s=t.append("circle");if(s.attr("cx",e.x),s.attr("cy",e.y),s.attr("r",r.type===w.MERGE?9:10),s.attr("class",`commit ${r.id} commit${n%8}`),a===w.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",6),a.attr("class",`commit ${o} ${r.id} commit${n%8}`)}if(a===w.REVERSE){t.append("path").attr("d",`M ${e.x-5},${e.y-5}L${e.x+5},${e.y+5}M${e.x-5},${e.y+5}L${e.x+5},${e.y-5}`).attr("class",`commit ${o} ${r.id} commit${n%8}`)}}}),"drawCommitBullet"),xt=e(((t,r,e,o)=>{var n;if(r.type!==w.CHERRY_PICK&&(r.customId&&r.type===w.MERGE||r.type!==w.MERGE)&&(null==Q?void 0:Q.showCommitLabel)){const a=t.append("g"),s=a.insert("rect").attr("class","commit-label-bkg"),i=a.append("text").attr("x",o).attr("y",e.y+25).attr("class","commit-label").text(r.id),c=null==(n=i.node())?void 0:n.getBBox();if(c&&(s.attr("x",e.posWithOffset-c.width/2-2).attr("y",e.y+13.5).attr("width",c.width+4).attr("height",c.height+4),"TB"===it||"BT"===it?(s.attr("x",e.x-(c.width+16+5)).attr("y",e.y-12),i.attr("x",e.x-(c.width+16)).attr("y",e.y+c.height-12)):i.attr("x",e.posWithOffset-c.width/2),Q.rotateCommitLabel))if("TB"===it||"BT"===it)i.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),s.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(c.width+10)/25*9.5,r=10+c.width/25*8.5;a.attr("transform","translate("+t+", "+r+") rotate(-45, "+o+", "+e.y+")")}}}),"drawCommitLabel"),ft=e(((t,r,e,o)=>{var n;if(r.tags.length>0){let a=0,s=0,i=0;const c=[];for(const o of r.tags.reverse()){const r=t.insert("polygon"),d=t.append("circle"),h=t.append("text").attr("y",e.y-16-a).attr("class","tag-label").text(o),m=null==(n=h.node())?void 0:n.getBBox();if(!m)throw new Error("Tag bbox not found");s=Math.max(s,m.width),i=Math.max(i,m.height),h.attr("x",e.posWithOffset-m.width/2),c.push({tag:h,hole:d,rect:r,yOffset:a}),a+=20}for(const{tag:t,hole:r,rect:n,yOffset:d}of c){const a=i/2,c=e.y-19.2-d;if(n.attr("class","tag-label-bkg").attr("points",`\n ${o-s/2-2},${c+2} \n ${o-s/2-2},${c-2}\n ${e.posWithOffset-s/2-4},${c-a-2}\n ${e.posWithOffset+s/2+4},${c-a-2}\n ${e.posWithOffset+s/2+4},${c+a+2}\n ${e.posWithOffset-s/2-4},${c+a+2}`),r.attr("cy",c).attr("cx",o-s/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===it||"BT"===it){const i=o+d;n.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${i+2}\n ${e.x},${i-2}\n ${e.x+tt},${i-a-2}\n ${e.x+tt+s+4},${i-a-2}\n ${e.x+tt+s+4},${i+a+2}\n ${e.x+tt},${i+a+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),r.attr("cx",e.x+2).attr("cy",i).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),t.attr("x",e.x+5).attr("y",i+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+o+")")}}}}),"drawCommitTags"),bt=e((t=>{switch(t.customType??t.type){case w.NORMAL:return"commit-normal";case w.REVERSE:return"commit-reverse";case w.HIGHLIGHT:return"commit-highlight";case w.MERGE:return"commit-merge";case w.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}}),"getCommitClassType"),wt=e(((t,r,e,o)=>{const n={x:0,y:0};if(!(t.parents.length>0)){if("TB"===r)return 30;if("BT"===r){return(o.get(t.id)??n).y-rt}return 0}{const e=ht(t.parents);if(e){const a=o.get(e)??n;if("TB"===r)return a.y+rt;if("BT"===r){return(o.get(t.id)??n).y-rt}return a.x+rt}}return 0}),"calculatePosition"),Bt=e(((t,r,e)=>{var o,n;const a="BT"===it&&e?r:r+tt,s="TB"===it||"BT"===it?a:null==(o=et.get(t.branch))?void 0:o.pos,i="TB"===it||"BT"===it?null==(n=et.get(t.branch))?void 0:n.pos:a;if(void 0===i||void 0===s)throw new Error(`Position were undefined for commit ${t.id}`);return{x:i,y:s,posWithOffset:a}}),"getCommitPosition"),Et=e(((t,r,o)=>{if(!Q)throw new Error("GitGraph config not found");const n=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels");let s="TB"===it||"BT"===it?30:0;const i=[...r.keys()],c=(null==Q?void 0:Q.parallelCommits)??!1,d=e(((t,e)=>{var o,n;const a=null==(o=r.get(t))?void 0:o.seq,s=null==(n=r.get(e))?void 0:n.seq;return void 0!==a&&void 0!==s?a-s:0}),"sortKeys");let h=i.sort(d);"BT"===it&&(c&&$t(h,r,s),h=h.reverse()),h.forEach((t=>{var e;const i=r.get(t);if(!i)throw new Error(`Commit not found for key ${t}`);c&&(s=wt(i,it,s,ot));const d=Bt(i,s,c);if(o){const t=bt(i),r=i.customType??i.type,o=(null==(e=et.get(i.branch))?void 0:e.index)??0;ut(n,i,d,t,o,r),xt(a,i,d,s),ft(a,i,d,s)}"TB"===it||"BT"===it?ot.set(i.id,{x:d.x,y:d.posWithOffset}):ot.set(i.id,{x:d.posWithOffset,y:d.y}),s="BT"===it&&c?s+rt:s+rt+tt,s>st&&(st=s)}))}),"drawCommits"),vt=e(((t,r,o,n,a)=>{const s=("TB"===it||"BT"===it?o.x<n.x:o.y<n.y)?r.branch:t.branch,i=e((t=>t.branch===s),"isOnBranchToGetCurve"),c=e((e=>e.seq>t.seq&&e.seq<r.seq),"isBetweenCommits");return[...a.values()].some((t=>c(t)&&i(t)))}),"shouldRerouteArrow"),kt=e(((t,r,e=0)=>{const o=t+Math.abs(t-r)/2;if(e>5)return o;if(at.every((t=>Math.abs(t-o)>=10)))return at.push(o),o;const n=Math.abs(t-r);return kt(t,r-n/5,e+1)}),"findLane"),Ct=e(((t,r,e,o)=>{var n,a,s,i,c;const d=ot.get(r.id),h=ot.get(e.id);if(void 0===d||void 0===h)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const m=vt(r,e,d,h,o);let $,l="",g="",y=0,p=0,u=null==(n=et.get(e.branch))?void 0:n.index;if(e.type===w.MERGE&&r.id!==e.parents[0]&&(u=null==(a=et.get(r.branch))?void 0:a.index),m){l="A 10 10, 0, 0, 0,",g="A 10 10, 0, 0, 1,",y=10,p=10;const t=d.y<h.y?kt(d.y,h.y):kt(h.y,d.y),e=d.x<h.x?kt(d.x,h.x):kt(h.x,d.x);"TB"===it?d.x<h.x?$=`M ${d.x} ${d.y} L ${e-y} ${d.y} ${g} ${e} ${d.y+p} L ${e} ${h.y-y} ${l} ${e+p} ${h.y} L ${h.x} ${h.y}`:(u=null==(s=et.get(r.branch))?void 0:s.index,$=`M ${d.x} ${d.y} L ${e+y} ${d.y} ${l} ${e} ${d.y+p} L ${e} ${h.y-y} ${g} ${e-p} ${h.y} L ${h.x} ${h.y}`):"BT"===it?d.x<h.x?$=`M ${d.x} ${d.y} L ${e-y} ${d.y} ${l} ${e} ${d.y-p} L ${e} ${h.y+y} ${g} ${e+p} ${h.y} L ${h.x} ${h.y}`:(u=null==(i=et.get(r.branch))?void 0:i.index,$=`M ${d.x} ${d.y} L ${e+y} ${d.y} ${g} ${e} ${d.y-p} L ${e} ${h.y+y} ${l} ${e-p} ${h.y} L ${h.x} ${h.y}`):d.y<h.y?$=`M ${d.x} ${d.y} L ${d.x} ${t-y} ${l} ${d.x+p} ${t} L ${h.x-y} ${t} ${g} ${h.x} ${t+p} L ${h.x} ${h.y}`:(u=null==(c=et.get(r.branch))?void 0:c.index,$=`M ${d.x} ${d.y} L ${d.x} ${t+y} ${g} ${d.x+p} ${t} L ${h.x-y} ${t} ${l} ${h.x} ${t-p} L ${h.x} ${h.y}`)}else l="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",y=20,p=20,"TB"===it?(d.x<h.x&&($=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${d.x} ${d.y} L ${d.x} ${h.y-y} ${l} ${d.x+p} ${h.y} L ${h.x} ${h.y}`:`M ${d.x} ${d.y} L ${h.x-y} ${d.y} ${g} ${h.x} ${d.y+p} L ${h.x} ${h.y}`),d.x>h.x&&(l="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",y=20,p=20,$=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${d.x} ${d.y} L ${d.x} ${h.y-y} ${g} ${d.x-p} ${h.y} L ${h.x} ${h.y}`:`M ${d.x} ${d.y} L ${h.x+y} ${d.y} ${l} ${h.x} ${d.y+p} L ${h.x} ${h.y}`),d.x===h.x&&($=`M ${d.x} ${d.y} L ${h.x} ${h.y}`)):"BT"===it?(d.x<h.x&&($=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${d.x} ${d.y} L ${d.x} ${h.y+y} ${g} ${d.x+p} ${h.y} L ${h.x} ${h.y}`:`M ${d.x} ${d.y} L ${h.x-y} ${d.y} ${l} ${h.x} ${d.y-p} L ${h.x} ${h.y}`),d.x>h.x&&(l="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",y=20,p=20,$=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${d.x} ${d.y} L ${d.x} ${h.y+y} ${l} ${d.x-p} ${h.y} L ${h.x} ${h.y}`:`M ${d.x} ${d.y} L ${h.x-y} ${d.y} ${l} ${h.x} ${d.y-p} L ${h.x} ${h.y}`),d.x===h.x&&($=`M ${d.x} ${d.y} L ${h.x} ${h.y}`)):(d.y<h.y&&($=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${d.x} ${d.y} L ${h.x-y} ${d.y} ${g} ${h.x} ${d.y+p} L ${h.x} ${h.y}`:`M ${d.x} ${d.y} L ${d.x} ${h.y-y} ${l} ${d.x+p} ${h.y} L ${h.x} ${h.y}`),d.y>h.y&&($=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${d.x} ${d.y} L ${h.x-y} ${d.y} ${l} ${h.x} ${d.y-p} L ${h.x} ${h.y}`:`M ${d.x} ${d.y} L ${d.x} ${h.y+y} ${g} ${d.x+p} ${h.y} L ${h.x} ${h.y}`),d.y===h.y&&($=`M ${d.x} ${d.y} L ${h.x} ${h.y}`));if(void 0===$)throw new Error("Line definition not found");t.append("path").attr("d",$).attr("class","arrow arrow"+u%8)}),"drawArrow"),Lt=e(((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach((t=>{const o=r.get(t);o.parents&&o.parents.length>0&&o.parents.forEach((t=>{Ct(e,r.get(t),o,r)}))}))}),"drawArrows"),Tt=e(((t,r)=>{const e=t.append("g");r.forEach(((t,r)=>{var o;const n=r%8,a=null==(o=et.get(t.name))?void 0:o.pos;if(void 0===a)throw new Error(`Position not found for branch ${t.name}`);const s=e.append("line");s.attr("x1",0),s.attr("y1",a),s.attr("x2",st),s.attr("y2",a),s.attr("class","branch branch"+n),"TB"===it?(s.attr("y1",30),s.attr("x1",a),s.attr("y2",st),s.attr("x2",a)):"BT"===it&&(s.attr("y1",st),s.attr("x1",a),s.attr("y2",30),s.attr("x2",a)),at.push(a);const i=t.name,c=dt(i),d=e.insert("rect"),h=e.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);h.node().appendChild(c);const m=c.getBBox();d.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-m.width-4-(!0===(null==Q?void 0:Q.rotateCommitLabel)?30:0)).attr("y",-m.height/2+8).attr("width",m.width+18).attr("height",m.height+4),h.attr("transform","translate("+(-m.width-14-(!0===(null==Q?void 0:Q.rotateCommitLabel)?30:0))+", "+(a-m.height/2-1)+")"),"TB"===it?(d.attr("x",a-m.width/2-10).attr("y",0),h.attr("transform","translate("+(a-m.width/2-5)+", 0)")):"BT"===it?(d.attr("x",a-m.width/2-10).attr("y",st),h.attr("transform","translate("+(a-m.width/2-5)+", "+st+")")):d.attr("transform","translate(-19, "+(a-m.height/2)+")")}))}),"drawBranches"),Mt=e((function(t,r,e,o,n){return et.set(t,{pos:r,index:e}),r+=50+(n?40:0)+("TB"===it||"BT"===it?o.width/2:0)}),"setBranchPosition"),Pt={parser:Z,db:W,renderer:{draw:e((function(t,r,e,o){if(ct(),d.debug("in gitgraph renderer",t+"\n","id:",r,e),!Q)throw new Error("GitGraph config not found");const n=Q.rotateCommitLabel??!1,a=o.db;nt=a.getCommits();const s=a.getBranchesAsObjArray();it=a.getDirection();const i=b(`[id="${r}"]`);let c=0;s.forEach(((t,r)=>{var e;const o=dt(t.name),a=i.append("g"),s=a.insert("g").attr("class","branchLabel"),d=s.insert("g").attr("class","label branch-label");null==(e=d.node())||e.appendChild(o);const h=o.getBBox();c=Mt(t.name,c,r,h,n),d.remove(),s.remove(),a.remove()})),Et(i,nt,!1),Q.showBranches&&Tt(i,s),Lt(i,nt),Et(i,nt,!0),m.insertTitle(i,"gitTitleText",Q.titleTopMargin??0,a.getDiagramTitle()),$(void 0,i,Q.diagramPadding,Q.useMaxWidth)}),"draw")},styles:e((t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((r=>`\n .branch-label${r} { fill: ${t["gitBranchLabel"+r]}; }\n .commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; }\n .label${r} { fill: ${t["git"+r]}; }\n .arrow${r} { stroke: ${t["git"+r]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`),"getStyles")};export{Pt as diagram};
1
+ import{p as t}from"./chunk-4BMEZGHF-CNlj2iKt.js";import{I as r}from"./chunk-XZIHB7SX-BcCHvDgC.js";import{_ as e,q as o,p as n,s as a,g as s,a as i,b as c,l as d,c as h,u as m,D as $,y as l,j as g,E as y,F as p,G as u,H as x}from"./mermaid-D2SdoFUx.js";import{p as f}from"./radar-MK3ICKWK-DRTZUi9y.js";import{s as b}from"./transform-DjHZbYKP.js";import"./index-D25ZVZoz.js";import"./step-BwsUM5iJ.js";import"./_baseEach-BOi1xMzz.js";import"./_baseUniq-EQxa8zIF.js";import"./min-Dg--LZAL.js";import"./_baseMap-D2kyVuny.js";import"./clone-2VLlfYv8.js";import"./_createAggregator-Dvx5-qYj.js";import"./timer-DFzT7np-.js";var w={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},B=u.gitGraph,E=e((()=>y({...B,...p().gitGraph})),"getConfig"),v=new r((()=>{const t=E(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}}));function k(){return x({length:7})}function C(t,r){const e=Object.create(null);return t.reduce(((t,o)=>{const n=r(o);return e[n]||(e[n]=!0,t.push(o)),t}),[])}e(k,"getID"),e(C,"uniqBy");var L=e((function(t){v.records.direction=t}),"setDirection"),T=e((function(t){d.debug("options str",t),t=(t=null==t?void 0:t.trim())||"{}";try{v.records.options=JSON.parse(t)}catch(r){d.error("error while parsing gitGraph options",r.message)}}),"setOptions"),M=e((function(){return v.records.options}),"getOptions"),P=e((function(t){let r=t.msg,e=t.id;const o=t.type;let n=t.tags;d.info("commit",r,e,o,n),d.debug("Entering commit:",r,e,o,n);const a=E();e=g.sanitizeText(e,a),r=g.sanitizeText(r,a),n=null==n?void 0:n.map((t=>g.sanitizeText(t,a)));const s={id:e||v.records.seq+"-"+k(),message:r,seq:v.records.seq++,type:o??w.NORMAL,tags:n??[],parents:null==v.records.head?[]:[v.records.head.id],branch:v.records.currBranch};v.records.head=s,d.info("main branch",a.mainBranchName),v.records.commits.set(s.id,s),v.records.branches.set(v.records.currBranch,s.id),d.debug("in pushCommit "+s.id)}),"commit"),R=e((function(t){let r=t.name;const e=t.order;if(r=g.sanitizeText(r,E()),v.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);v.records.branches.set(r,null!=v.records.head?v.records.head.id:null),v.records.branchConfig.set(r,{name:r,order:e}),G(r),d.debug("in createBranch")}),"branch"),I=e((t=>{let r=t.branch,e=t.id;const o=t.type,n=t.tags,a=E();r=g.sanitizeText(r,a),e&&(e=g.sanitizeText(e,a));const s=v.records.branches.get(v.records.currBranch),i=v.records.branches.get(r),c=s?v.records.commits.get(s):void 0,h=i?v.records.commits.get(i):void 0;if(c&&h&&c.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(v.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===c||!c){const t=new Error(`Incorrect usage of "merge". Current branch (${v.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!v.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===h||!h){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if(c===h){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&v.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw t.hash={text:`merge ${r} ${e} ${o} ${null==n?void 0:n.join(" ")}`,token:`merge ${r} ${e} ${o} ${null==n?void 0:n.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${o} ${null==n?void 0:n.join(" ")}`]},t}const m=i||"",$={id:e||`${v.records.seq}-${k()}`,message:`merged branch ${r} into ${v.records.currBranch}`,seq:v.records.seq++,parents:null==v.records.head?[]:[v.records.head.id,m],branch:v.records.currBranch,type:w.MERGE,customType:o,customId:!!e,tags:n??[]};v.records.head=$,v.records.commits.set($.id,$),v.records.branches.set(v.records.currBranch,$.id),d.debug(v.records.branches),d.debug("in mergeBranch")}),"merge"),A=e((function(t){let r=t.id,e=t.targetId,o=t.tags,n=t.parent;d.debug("Entering cherryPick:",r,e,o);const a=E();if(r=g.sanitizeText(r,a),e=g.sanitizeText(e,a),o=null==o?void 0:o.map((t=>g.sanitizeText(t,a))),n=g.sanitizeText(n,a),!r||!v.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const s=v.records.commits.get(r);if(void 0===s||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(s.parents)||!s.parents.includes(n))){throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.")}const i=s.branch;if(s.type===w.MERGE&&!n){throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.")}if(!e||!v.records.commits.has(e)){if(i===v.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=v.records.branches.get(v.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${v.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=v.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${v.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const c={id:v.records.seq+"-"+k(),message:`cherry-picked ${null==s?void 0:s.message} into ${v.records.currBranch}`,seq:v.records.seq++,parents:null==v.records.head?[]:[v.records.head.id,s.id],branch:v.records.currBranch,type:w.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${s.id}${s.type===w.MERGE?`|parent:${n}`:""}`]};v.records.head=c,v.records.commits.set(c.id,c),v.records.branches.set(v.records.currBranch,c.id),d.debug(v.records.branches),d.debug("in cherryPick")}}),"cherryPick"),G=e((function(t){if(t=g.sanitizeText(t,E()),!v.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{v.records.currBranch=t;const r=v.records.branches.get(v.records.currBranch);v.records.head=void 0!==r&&r?v.records.commits.get(r)??null:null}}),"checkout");function O(t,r,e){const o=t.indexOf(r);-1===o?t.push(e):t.splice(o,1,e)}function j(t){const r=t.reduce(((t,r)=>t.seq>r.seq?t:r),t[0]);let e="";t.forEach((function(t){e+=t===r?"\t*":"\t|"}));const o=[e,r.id,r.seq];for(const n in v.records.branches)v.records.branches.get(n)===r.id&&o.push(n);if(d.debug(o.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=v.records.commits.get(r.parents[0]);O(t,r,e),r.parents[1]&&t.push(v.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=v.records.commits.get(r.parents[0]);O(t,r,e)}}j(t=C(t,(t=>t.id)))}e(O,"upsert"),e(j,"prettyPrintCommitHistory");var q=e((function(){d.debug(v.records.commits);j([N()[0]])}),"prettyPrint"),H=e((function(){v.reset(),l()}),"clear"),z=e((function(){return[...v.records.branchConfig.values()].map(((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)})).sort(((t,r)=>(t.order??0)-(r.order??0))).map((({name:t})=>({name:t})))}),"getBranchesAsObjArray"),S=e((function(){return v.records.branches}),"getBranches"),D=e((function(){return v.records.commits}),"getCommits"),N=e((function(){const t=[...v.records.commits.values()];return t.forEach((function(t){d.debug(t.id)})),t.sort(((t,r)=>t.seq-r.seq)),t}),"getCommitsArray"),W={commitType:w,getConfig:E,setDirection:L,setOptions:T,getOptions:M,commit:P,branch:R,merge:I,cherryPick:A,checkout:G,prettyPrint:q,clear:H,getBranchesAsObjArray:z,getBranches:S,getCommits:D,getCommitsArray:N,getCurrentBranch:e((function(){return v.records.currBranch}),"getCurrentBranch"),getDirection:e((function(){return v.records.direction}),"getDirection"),getHead:e((function(){return v.records.head}),"getHead"),setAccTitle:c,getAccTitle:i,getAccDescription:s,setAccDescription:a,setDiagramTitle:n,getDiagramTitle:o},_=e(((r,e)=>{t(r,e),r.dir&&e.setDirection(r.dir);for(const t of r.statements)K(t,e)}),"populate"),K=e(((t,r)=>{const o={Commit:e((t=>r.commit(F(t))),"Commit"),Branch:e((t=>r.branch(U(t))),"Branch"),Merge:e((t=>r.merge(Y(t))),"Merge"),Checkout:e((t=>r.checkout(V(t))),"Checkout"),CherryPicking:e((t=>r.cherryPick(X(t))),"CherryPicking")}[t.$type];o?o(t):d.error(`Unknown statement type: ${t.$type}`)}),"parseStatement"),F=e((t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?w[t.type]:w.NORMAL,tags:t.tags??void 0})),"parseCommit"),U=e((t=>({name:t.name,order:t.order??0})),"parseBranch"),Y=e((t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?w[t.type]:void 0,tags:t.tags??void 0})),"parseMerge"),V=e((t=>t.branch),"parseCheckout"),X=e((t=>{var r;return{id:t.id,targetId:"",tags:0===(null==(r=t.tags)?void 0:r.length)?void 0:t.tags,parent:t.parent}}),"parseCherryPicking"),Z={parse:e((async t=>{const r=await f("gitGraph",t);d.debug(r),_(r,W)}),"parse")},J=h(),Q=null==J?void 0:J.gitGraph,tt=10,rt=40,et=new Map,ot=new Map,nt=new Map,at=[],st=0,it="LR",ct=e((()=>{et.clear(),ot.clear(),nt.clear(),st=0,at=[],it="LR"}),"clear"),dt=e((t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach((t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)})),r}),"drawText"),ht=e((t=>{let r,o,n;return"BT"===it?(o=e(((t,r)=>t<=r),"comparisonFunc"),n=1/0):(o=e(((t,r)=>t>=r),"comparisonFunc"),n=0),t.forEach((t=>{var e,a;const s="TB"===it||"BT"==it?null==(e=ot.get(t))?void 0:e.y:null==(a=ot.get(t))?void 0:a.x;void 0!==s&&o(s,n)&&(r=t,n=s)})),r}),"findClosestParent"),mt=e((t=>{let r="",e=1/0;return t.forEach((t=>{const o=ot.get(t).y;o<=e&&(r=t,e=o)})),r||void 0}),"findClosestParentBT"),$t=e(((t,r,e)=>{let o=e,n=e;const a=[];t.forEach((t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(o=gt(e),n=Math.max(o,n)):a.push(e),yt(e,o)})),o=n,a.forEach((t=>{pt(t,o,e)})),t.forEach((t=>{const e=r.get(t);if(null==e?void 0:e.parents.length){const t=mt(e.parents);o=ot.get(t).y-rt,o<=n&&(n=o);const r=et.get(e.branch).pos,a=o-tt;ot.set(e.id,{x:r,y:a})}}))}),"setParallelBTPos"),lt=e((t=>{var r;const e=ht(t.parents.filter((t=>null!==t)));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);const o=null==(r=ot.get(e))?void 0:r.y;if(void 0===o)throw new Error(`Closest parent position not found for commit ${t.id}`);return o}),"findClosestParentPos"),gt=e((t=>lt(t)+rt),"calculateCommitPosition"),yt=e(((t,r)=>{const e=et.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const o=e.pos,n=r+tt;return ot.set(t.id,{x:o,y:n}),{x:o,y:n}}),"setCommitPosition"),pt=e(((t,r,e)=>{const o=et.get(t.branch);if(!o)throw new Error(`Branch not found for commit ${t.id}`);const n=r+e,a=o.pos;ot.set(t.id,{x:a,y:n})}),"setRootPosition"),ut=e(((t,r,e,o,n,a)=>{if(a===w.HIGHLIGHT)t.append("rect").attr("x",e.x-10).attr("y",e.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${n%8} ${o}-outer`),t.append("rect").attr("x",e.x-6).attr("y",e.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${n%8} ${o}-inner`);else if(a===w.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",10).attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${o}`);else{const s=t.append("circle");if(s.attr("cx",e.x),s.attr("cy",e.y),s.attr("r",r.type===w.MERGE?9:10),s.attr("class",`commit ${r.id} commit${n%8}`),a===w.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",6),a.attr("class",`commit ${o} ${r.id} commit${n%8}`)}if(a===w.REVERSE){t.append("path").attr("d",`M ${e.x-5},${e.y-5}L${e.x+5},${e.y+5}M${e.x-5},${e.y+5}L${e.x+5},${e.y-5}`).attr("class",`commit ${o} ${r.id} commit${n%8}`)}}}),"drawCommitBullet"),xt=e(((t,r,e,o)=>{var n;if(r.type!==w.CHERRY_PICK&&(r.customId&&r.type===w.MERGE||r.type!==w.MERGE)&&(null==Q?void 0:Q.showCommitLabel)){const a=t.append("g"),s=a.insert("rect").attr("class","commit-label-bkg"),i=a.append("text").attr("x",o).attr("y",e.y+25).attr("class","commit-label").text(r.id),c=null==(n=i.node())?void 0:n.getBBox();if(c&&(s.attr("x",e.posWithOffset-c.width/2-2).attr("y",e.y+13.5).attr("width",c.width+4).attr("height",c.height+4),"TB"===it||"BT"===it?(s.attr("x",e.x-(c.width+16+5)).attr("y",e.y-12),i.attr("x",e.x-(c.width+16)).attr("y",e.y+c.height-12)):i.attr("x",e.posWithOffset-c.width/2),Q.rotateCommitLabel))if("TB"===it||"BT"===it)i.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),s.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(c.width+10)/25*9.5,r=10+c.width/25*8.5;a.attr("transform","translate("+t+", "+r+") rotate(-45, "+o+", "+e.y+")")}}}),"drawCommitLabel"),ft=e(((t,r,e,o)=>{var n;if(r.tags.length>0){let a=0,s=0,i=0;const c=[];for(const o of r.tags.reverse()){const r=t.insert("polygon"),d=t.append("circle"),h=t.append("text").attr("y",e.y-16-a).attr("class","tag-label").text(o),m=null==(n=h.node())?void 0:n.getBBox();if(!m)throw new Error("Tag bbox not found");s=Math.max(s,m.width),i=Math.max(i,m.height),h.attr("x",e.posWithOffset-m.width/2),c.push({tag:h,hole:d,rect:r,yOffset:a}),a+=20}for(const{tag:t,hole:r,rect:n,yOffset:d}of c){const a=i/2,c=e.y-19.2-d;if(n.attr("class","tag-label-bkg").attr("points",`\n ${o-s/2-2},${c+2} \n ${o-s/2-2},${c-2}\n ${e.posWithOffset-s/2-4},${c-a-2}\n ${e.posWithOffset+s/2+4},${c-a-2}\n ${e.posWithOffset+s/2+4},${c+a+2}\n ${e.posWithOffset-s/2-4},${c+a+2}`),r.attr("cy",c).attr("cx",o-s/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===it||"BT"===it){const i=o+d;n.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${i+2}\n ${e.x},${i-2}\n ${e.x+tt},${i-a-2}\n ${e.x+tt+s+4},${i-a-2}\n ${e.x+tt+s+4},${i+a+2}\n ${e.x+tt},${i+a+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),r.attr("cx",e.x+2).attr("cy",i).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),t.attr("x",e.x+5).attr("y",i+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+o+")")}}}}),"drawCommitTags"),bt=e((t=>{switch(t.customType??t.type){case w.NORMAL:return"commit-normal";case w.REVERSE:return"commit-reverse";case w.HIGHLIGHT:return"commit-highlight";case w.MERGE:return"commit-merge";case w.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}}),"getCommitClassType"),wt=e(((t,r,e,o)=>{const n={x:0,y:0};if(!(t.parents.length>0)){if("TB"===r)return 30;if("BT"===r){return(o.get(t.id)??n).y-rt}return 0}{const e=ht(t.parents);if(e){const a=o.get(e)??n;if("TB"===r)return a.y+rt;if("BT"===r){return(o.get(t.id)??n).y-rt}return a.x+rt}}return 0}),"calculatePosition"),Bt=e(((t,r,e)=>{var o,n;const a="BT"===it&&e?r:r+tt,s="TB"===it||"BT"===it?a:null==(o=et.get(t.branch))?void 0:o.pos,i="TB"===it||"BT"===it?null==(n=et.get(t.branch))?void 0:n.pos:a;if(void 0===i||void 0===s)throw new Error(`Position were undefined for commit ${t.id}`);return{x:i,y:s,posWithOffset:a}}),"getCommitPosition"),Et=e(((t,r,o)=>{if(!Q)throw new Error("GitGraph config not found");const n=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels");let s="TB"===it||"BT"===it?30:0;const i=[...r.keys()],c=(null==Q?void 0:Q.parallelCommits)??!1,d=e(((t,e)=>{var o,n;const a=null==(o=r.get(t))?void 0:o.seq,s=null==(n=r.get(e))?void 0:n.seq;return void 0!==a&&void 0!==s?a-s:0}),"sortKeys");let h=i.sort(d);"BT"===it&&(c&&$t(h,r,s),h=h.reverse()),h.forEach((t=>{var e;const i=r.get(t);if(!i)throw new Error(`Commit not found for key ${t}`);c&&(s=wt(i,it,s,ot));const d=Bt(i,s,c);if(o){const t=bt(i),r=i.customType??i.type,o=(null==(e=et.get(i.branch))?void 0:e.index)??0;ut(n,i,d,t,o,r),xt(a,i,d,s),ft(a,i,d,s)}"TB"===it||"BT"===it?ot.set(i.id,{x:d.x,y:d.posWithOffset}):ot.set(i.id,{x:d.posWithOffset,y:d.y}),s="BT"===it&&c?s+rt:s+rt+tt,s>st&&(st=s)}))}),"drawCommits"),vt=e(((t,r,o,n,a)=>{const s=("TB"===it||"BT"===it?o.x<n.x:o.y<n.y)?r.branch:t.branch,i=e((t=>t.branch===s),"isOnBranchToGetCurve"),c=e((e=>e.seq>t.seq&&e.seq<r.seq),"isBetweenCommits");return[...a.values()].some((t=>c(t)&&i(t)))}),"shouldRerouteArrow"),kt=e(((t,r,e=0)=>{const o=t+Math.abs(t-r)/2;if(e>5)return o;if(at.every((t=>Math.abs(t-o)>=10)))return at.push(o),o;const n=Math.abs(t-r);return kt(t,r-n/5,e+1)}),"findLane"),Ct=e(((t,r,e,o)=>{var n,a,s,i,c;const d=ot.get(r.id),h=ot.get(e.id);if(void 0===d||void 0===h)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const m=vt(r,e,d,h,o);let $,l="",g="",y=0,p=0,u=null==(n=et.get(e.branch))?void 0:n.index;if(e.type===w.MERGE&&r.id!==e.parents[0]&&(u=null==(a=et.get(r.branch))?void 0:a.index),m){l="A 10 10, 0, 0, 0,",g="A 10 10, 0, 0, 1,",y=10,p=10;const t=d.y<h.y?kt(d.y,h.y):kt(h.y,d.y),e=d.x<h.x?kt(d.x,h.x):kt(h.x,d.x);"TB"===it?d.x<h.x?$=`M ${d.x} ${d.y} L ${e-y} ${d.y} ${g} ${e} ${d.y+p} L ${e} ${h.y-y} ${l} ${e+p} ${h.y} L ${h.x} ${h.y}`:(u=null==(s=et.get(r.branch))?void 0:s.index,$=`M ${d.x} ${d.y} L ${e+y} ${d.y} ${l} ${e} ${d.y+p} L ${e} ${h.y-y} ${g} ${e-p} ${h.y} L ${h.x} ${h.y}`):"BT"===it?d.x<h.x?$=`M ${d.x} ${d.y} L ${e-y} ${d.y} ${l} ${e} ${d.y-p} L ${e} ${h.y+y} ${g} ${e+p} ${h.y} L ${h.x} ${h.y}`:(u=null==(i=et.get(r.branch))?void 0:i.index,$=`M ${d.x} ${d.y} L ${e+y} ${d.y} ${g} ${e} ${d.y-p} L ${e} ${h.y+y} ${l} ${e-p} ${h.y} L ${h.x} ${h.y}`):d.y<h.y?$=`M ${d.x} ${d.y} L ${d.x} ${t-y} ${l} ${d.x+p} ${t} L ${h.x-y} ${t} ${g} ${h.x} ${t+p} L ${h.x} ${h.y}`:(u=null==(c=et.get(r.branch))?void 0:c.index,$=`M ${d.x} ${d.y} L ${d.x} ${t+y} ${g} ${d.x+p} ${t} L ${h.x-y} ${t} ${l} ${h.x} ${t-p} L ${h.x} ${h.y}`)}else l="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",y=20,p=20,"TB"===it?(d.x<h.x&&($=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${d.x} ${d.y} L ${d.x} ${h.y-y} ${l} ${d.x+p} ${h.y} L ${h.x} ${h.y}`:`M ${d.x} ${d.y} L ${h.x-y} ${d.y} ${g} ${h.x} ${d.y+p} L ${h.x} ${h.y}`),d.x>h.x&&(l="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",y=20,p=20,$=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${d.x} ${d.y} L ${d.x} ${h.y-y} ${g} ${d.x-p} ${h.y} L ${h.x} ${h.y}`:`M ${d.x} ${d.y} L ${h.x+y} ${d.y} ${l} ${h.x} ${d.y+p} L ${h.x} ${h.y}`),d.x===h.x&&($=`M ${d.x} ${d.y} L ${h.x} ${h.y}`)):"BT"===it?(d.x<h.x&&($=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${d.x} ${d.y} L ${d.x} ${h.y+y} ${g} ${d.x+p} ${h.y} L ${h.x} ${h.y}`:`M ${d.x} ${d.y} L ${h.x-y} ${d.y} ${l} ${h.x} ${d.y-p} L ${h.x} ${h.y}`),d.x>h.x&&(l="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",y=20,p=20,$=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${d.x} ${d.y} L ${d.x} ${h.y+y} ${l} ${d.x-p} ${h.y} L ${h.x} ${h.y}`:`M ${d.x} ${d.y} L ${h.x-y} ${d.y} ${l} ${h.x} ${d.y-p} L ${h.x} ${h.y}`),d.x===h.x&&($=`M ${d.x} ${d.y} L ${h.x} ${h.y}`)):(d.y<h.y&&($=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${d.x} ${d.y} L ${h.x-y} ${d.y} ${g} ${h.x} ${d.y+p} L ${h.x} ${h.y}`:`M ${d.x} ${d.y} L ${d.x} ${h.y-y} ${l} ${d.x+p} ${h.y} L ${h.x} ${h.y}`),d.y>h.y&&($=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${d.x} ${d.y} L ${h.x-y} ${d.y} ${l} ${h.x} ${d.y-p} L ${h.x} ${h.y}`:`M ${d.x} ${d.y} L ${d.x} ${h.y+y} ${g} ${d.x+p} ${h.y} L ${h.x} ${h.y}`),d.y===h.y&&($=`M ${d.x} ${d.y} L ${h.x} ${h.y}`));if(void 0===$)throw new Error("Line definition not found");t.append("path").attr("d",$).attr("class","arrow arrow"+u%8)}),"drawArrow"),Lt=e(((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach((t=>{const o=r.get(t);o.parents&&o.parents.length>0&&o.parents.forEach((t=>{Ct(e,r.get(t),o,r)}))}))}),"drawArrows"),Tt=e(((t,r)=>{const e=t.append("g");r.forEach(((t,r)=>{var o;const n=r%8,a=null==(o=et.get(t.name))?void 0:o.pos;if(void 0===a)throw new Error(`Position not found for branch ${t.name}`);const s=e.append("line");s.attr("x1",0),s.attr("y1",a),s.attr("x2",st),s.attr("y2",a),s.attr("class","branch branch"+n),"TB"===it?(s.attr("y1",30),s.attr("x1",a),s.attr("y2",st),s.attr("x2",a)):"BT"===it&&(s.attr("y1",st),s.attr("x1",a),s.attr("y2",30),s.attr("x2",a)),at.push(a);const i=t.name,c=dt(i),d=e.insert("rect"),h=e.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);h.node().appendChild(c);const m=c.getBBox();d.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-m.width-4-(!0===(null==Q?void 0:Q.rotateCommitLabel)?30:0)).attr("y",-m.height/2+8).attr("width",m.width+18).attr("height",m.height+4),h.attr("transform","translate("+(-m.width-14-(!0===(null==Q?void 0:Q.rotateCommitLabel)?30:0))+", "+(a-m.height/2-1)+")"),"TB"===it?(d.attr("x",a-m.width/2-10).attr("y",0),h.attr("transform","translate("+(a-m.width/2-5)+", 0)")):"BT"===it?(d.attr("x",a-m.width/2-10).attr("y",st),h.attr("transform","translate("+(a-m.width/2-5)+", "+st+")")):d.attr("transform","translate(-19, "+(a-m.height/2)+")")}))}),"drawBranches"),Mt=e((function(t,r,e,o,n){return et.set(t,{pos:r,index:e}),r+=50+(n?40:0)+("TB"===it||"BT"===it?o.width/2:0)}),"setBranchPosition"),Pt={parser:Z,db:W,renderer:{draw:e((function(t,r,e,o){if(ct(),d.debug("in gitgraph renderer",t+"\n","id:",r,e),!Q)throw new Error("GitGraph config not found");const n=Q.rotateCommitLabel??!1,a=o.db;nt=a.getCommits();const s=a.getBranchesAsObjArray();it=a.getDirection();const i=b(`[id="${r}"]`);let c=0;s.forEach(((t,r)=>{var e;const o=dt(t.name),a=i.append("g"),s=a.insert("g").attr("class","branchLabel"),d=s.insert("g").attr("class","label branch-label");null==(e=d.node())||e.appendChild(o);const h=o.getBBox();c=Mt(t.name,c,r,h,n),d.remove(),s.remove(),a.remove()})),Et(i,nt,!1),Q.showBranches&&Tt(i,s),Lt(i,nt),Et(i,nt,!0),m.insertTitle(i,"gitTitleText",Q.titleTopMargin??0,a.getDiagramTitle()),$(void 0,i,Q.diagramPadding,Q.useMaxWidth)}),"draw")},styles:e((t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((r=>`\n .branch-label${r} { fill: ${t["gitBranchLabel"+r]}; }\n .commit${r} { stroke: ${t["git"+r]}; fill: ${t["git"+r]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+r]}; fill: ${t["gitInv"+r]}; }\n .label${r} { fill: ${t["git"+r]}; }\n .arrow${r} { stroke: ${t["git"+r]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`),"getStyles")};export{Pt as diagram};
@@ -1 +1 @@
1
- import{H as e,J as t,K as s,M as i,O as r,P as n}from"./index-BTHBullW.js";import{a as h,f as o,c as d,i as a,v as u,r as _}from"./_baseUniq-CWPdB_dq.js";import{a9 as l}from"./mermaid-DNVHAxFt.js";var c=e((function(e){return h(t(e,1,s,!0))})),p="\0";class g{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,"directed")||e.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=i(void 0),this._defaultEdgeLabelFn=i(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[p]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return r(e)||(e=i(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return n(this._nodes)}sources(){var e=this;return o(this.nodes(),(function(t){return l(e._in[t])}))}sinks(){var e=this;return o(this.nodes(),(function(t){return l(e._out[t])}))}setNodes(e,t){var s=arguments,i=this;return d(e,(function(e){s.length>1?i.setNode(e,t):i.setNode(e)})),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=p,this._children[e]={},this._children[p][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),(e=>{this.setParent(e)})),delete this._children[e]),d(n(this._in[e]),t),delete this._in[e],delete this._preds[e],d(n(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(a(t))t=p;else{for(var s=t+="";!a(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==p)return t}}children(e){if(a(e)&&(e=p),this._isCompound){var t=this._children[e];if(t)return n(t)}else{if(e===p)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return n(t)}successors(e){var t=this._sucs[e];if(t)return n(t)}neighbors(e){var t=this.predecessors(e);if(t)return c(t,this.successors(e))}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;d(this._nodes,(function(s,i){e(i)&&t.setNode(i,s)})),d(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,s.edge(e))}));var i={};function r(e){var n=s.parent(e);return void 0===n||t.hasNode(n)?(i[e]=n,n):n in i?i[n]:r(n)}return this._isCompound&&d(t.nodes(),(function(e){t.setParent(e,r(e))})),t}setDefaultEdgeLabel(e){return r(e)||(e=i(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return u(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return _(e,(function(e,r){return i.length>1?s.setEdge(e,r,t):s.setEdge(e,r),r})),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];"object"==typeof n&&null!==n&&"v"in n?(e=n.v,t=n.w,s=n.name,2===arguments.length&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,a(s)||(s=""+s);var h=m(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!a(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var o=function(e,t,s,i){var r=""+t,n=""+s;if(!e&&r>n){var h=r;r=n,n=h}var o={v:r,w:n};i&&(o.name=i);return o}(this._isDirected,e,t,s);return e=o.v,t=o.w,Object.freeze(o),this._edgeObjs[h]=o,f(this._preds[t],e),f(this._sucs[e],t),this._in[t][h]=o,this._out[e][h]=o,this._edgeCount++,this}edge(e,t,s){var i=1===arguments.length?b(this._isDirected,arguments[0]):m(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=1===arguments.length?b(this._isDirected,arguments[0]):m(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=1===arguments.length?b(this._isDirected,arguments[0]):m(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],v(this._preds[t],e),v(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=u(s);return t?o(i,(function(e){return e.v===t})):i}}outEdges(e,t){var s=this._out[e];if(s){var i=u(s);return t?o(i,(function(e){return e.w===t})):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}function f(e,t){e[t]?e[t]++:e[t]=1}function v(e,t){--e[t]||delete e[t]}function m(e,t,s,i){var r=""+t,n=""+s;if(!e&&r>n){var h=r;r=n,n=h}return r+""+n+""+(a(i)?"\0":i)}function b(e,t){return m(e,t.v,t.w,t.name)}g.prototype._nodeCount=0,g.prototype._edgeCount=0;export{g as G};
1
+ import{H as e,J as t,K as s,M as i,O as r,P as n}from"./index-D25ZVZoz.js";import{a as h,f as o,c as d,i as a,v as u,r as _}from"./_baseUniq-EQxa8zIF.js";import{a9 as l}from"./mermaid-D2SdoFUx.js";var c=e((function(e){return h(t(e,1,s,!0))})),p="\0";class g{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,"directed")||e.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=i(void 0),this._defaultEdgeLabelFn=i(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[p]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return r(e)||(e=i(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return n(this._nodes)}sources(){var e=this;return o(this.nodes(),(function(t){return l(e._in[t])}))}sinks(){var e=this;return o(this.nodes(),(function(t){return l(e._out[t])}))}setNodes(e,t){var s=arguments,i=this;return d(e,(function(e){s.length>1?i.setNode(e,t):i.setNode(e)})),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=p,this._children[e]={},this._children[p][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),(e=>{this.setParent(e)})),delete this._children[e]),d(n(this._in[e]),t),delete this._in[e],delete this._preds[e],d(n(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(a(t))t=p;else{for(var s=t+="";!a(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==p)return t}}children(e){if(a(e)&&(e=p),this._isCompound){var t=this._children[e];if(t)return n(t)}else{if(e===p)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return n(t)}successors(e){var t=this._sucs[e];if(t)return n(t)}neighbors(e){var t=this.predecessors(e);if(t)return c(t,this.successors(e))}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;d(this._nodes,(function(s,i){e(i)&&t.setNode(i,s)})),d(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,s.edge(e))}));var i={};function r(e){var n=s.parent(e);return void 0===n||t.hasNode(n)?(i[e]=n,n):n in i?i[n]:r(n)}return this._isCompound&&d(t.nodes(),(function(e){t.setParent(e,r(e))})),t}setDefaultEdgeLabel(e){return r(e)||(e=i(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return u(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return _(e,(function(e,r){return i.length>1?s.setEdge(e,r,t):s.setEdge(e,r),r})),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];"object"==typeof n&&null!==n&&"v"in n?(e=n.v,t=n.w,s=n.name,2===arguments.length&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,a(s)||(s=""+s);var h=m(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!a(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var o=function(e,t,s,i){var r=""+t,n=""+s;if(!e&&r>n){var h=r;r=n,n=h}var o={v:r,w:n};i&&(o.name=i);return o}(this._isDirected,e,t,s);return e=o.v,t=o.w,Object.freeze(o),this._edgeObjs[h]=o,f(this._preds[t],e),f(this._sucs[e],t),this._in[t][h]=o,this._out[e][h]=o,this._edgeCount++,this}edge(e,t,s){var i=1===arguments.length?b(this._isDirected,arguments[0]):m(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=1===arguments.length?b(this._isDirected,arguments[0]):m(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=1===arguments.length?b(this._isDirected,arguments[0]):m(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],v(this._preds[t],e),v(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=u(s);return t?o(i,(function(e){return e.v===t})):i}}outEdges(e,t){var s=this._out[e];if(s){var i=u(s);return t?o(i,(function(e){return e.w===t})):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}function f(e,t){e[t]?e[t]++:e[t]=1}function v(e,t){--e[t]||delete e[t]}function m(e,t,s,i){var r=""+t,n=""+s;if(!e&&r>n){var h=r;r=n,n=h}return r+""+n+""+(a(i)?"\0":i)}function b(e,t){return m(e,t.v,t.w,t.name)}g.prototype._nodeCount=0,g.prototype._edgeCount=0;export{g as G};
@@ -1,4 +1,4 @@
1
- import{u as e,R as t,bb as a,bc as s,d as r,j as o,bd as n,be as i,aJ as l,bf as c,bg as d,bh as m,Z as h,bi as u,bj as x,aB as f,bk as p,a2 as b,bl as y,S as g,aE as j,bm as v,bn as k,bo as w,bp as N,bq as _,br as S,bs as z,bt as C,bu as M,bv as I,bw as P,bx as D,al as A,by as O,bz as T,ag as R,aq as L,ar as W,bA as $,bB as B,bC as H,bD as E,a8 as F,ap as J,bE as U,bF as V,bG as q,bH as G,bI as Y,bJ as Q,bK as K,bL as Z,bM as X,bN as ee,W as te}from"./index-BTHBullW.js";import{M as ae,G as se,A as re,B as oe,a as ne,b as ie,Y as le,L as ce,u as de,C as me,S as he,T as ue,P as xe}from"./tree-DxEOaINK.js";import{C as fe}from"./circle-play-B3IPtL97.js";import"./index-qlq3rtTI.js";
1
+ import{u as e,R as t,bb as a,bc as s,d as r,j as o,bd as n,be as i,aJ as l,bf as c,bg as d,bh as m,Z as h,bi as u,bj as x,aB as f,bk as p,a2 as b,bl as y,S as g,aE as j,bm as v,bn as k,bo as w,bp as N,bq as _,br as S,bs as z,bt as C,bu as M,bv as I,bw as P,bx as D,al as A,by as O,bz as T,ag as R,aq as L,ar as W,bA as $,bB as B,bC as H,bD as E,a8 as F,ap as J,bE as U,bF as V,bG as q,bH as G,bI as Y,bJ as Q,bK as K,bL as Z,bM as X,bN as ee,W as te}from"./index-D25ZVZoz.js";import{M as ae,G as se,A as re,B as oe,a as ne,b as ie,Y as le,L as ce,u as de,C as me,S as he,T as ue,P as xe}from"./tree-gS-oXpYe.js";import{C as fe}from"./circle-play-Bc0uRvfe.js";import"./index-D0xs4wpq.js";
2
2
  /**
3
3
  * @license lucide-react v0.503.0 - ISC
4
4
  *