@flowfuse/node-red-dashboard 1.31.0 → 1.31.1-0abe89c-202609211346.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/nodes/config/ui_base.js +15 -1
  2. package/nodes/store/clients.js +71 -0
  3. package/nodes/utils/index.js +8 -1
  4. package/nodes/widgets/locales/en-US/ui_control.json +2 -1
  5. package/nodes/widgets/ui_chart.js +7 -3
  6. package/nodes/widgets/ui_control.html +1 -1
  7. package/nodes/widgets/ui_control.js +28 -0
  8. package/package.json +4 -4
  9. package/dist/apple-touch-icon.png +0 -0
  10. package/dist/assets/abnfDiagram-N423BO3Z-BOzAedUe.js +0 -1
  11. package/dist/assets/architectureDiagram-T3A2C74G-zEM8gtfO.js +0 -36
  12. package/dist/assets/blockDiagram-VBNYF7ZC-eKuDT4u2.js +0 -132
  13. package/dist/assets/c4Diagram-5PPSVZJV-CRPvpwR2.js +0 -10
  14. package/dist/assets/chunk-2GRJ4B5K-BUP9p1Ar.js +0 -1
  15. package/dist/assets/chunk-2Q5K7J3B-DASHHxaC.js +0 -1
  16. package/dist/assets/chunk-5RXB4S5H-C76llYJF.js +0 -231
  17. package/dist/assets/chunk-5VM5RSS4-DnmzQEFn.js +0 -15
  18. package/dist/assets/chunk-6Q2QTUOP-DpGB6o5S.js +0 -88
  19. package/dist/assets/chunk-GF5L2VYU-Bhzwn3VL.js +0 -206
  20. package/dist/assets/chunk-JWPE2WC7-UNqcBwu_.js +0 -1
  21. package/dist/assets/chunk-KBJHAD2P-C38IW_UU.js +0 -1
  22. package/dist/assets/chunk-RYQCIY6F-COKxTTcO.js +0 -1
  23. package/dist/assets/chunk-XXDRQBXY-BS0ojEzX.js +0 -1
  24. package/dist/assets/classDiagram-JCYQIIEL-CxMqqBtQ.js +0 -1
  25. package/dist/assets/classDiagram-v2-OCEON4UE-CxMqqBtQ.js +0 -1
  26. package/dist/assets/cose-bilkent-JH36ORCC-9jRlXuji.js +0 -1
  27. package/dist/assets/cynefin-VYW2F7L2-BDPznSFQ.js +0 -178
  28. package/dist/assets/cynefinDiagram-MW4NZA55-lSqlEkCZ.js +0 -62
  29. package/dist/assets/cytoscape.esm-D_LviqZs.js +0 -331
  30. package/dist/assets/dagre-VZM6K2ZE-Dfoe_jp9.js +0 -4
  31. package/dist/assets/diagram-7IWD3JNH-Df2T__dV.js +0 -30
  32. package/dist/assets/diagram-B4RE2ZJO-DoGtC0h7.js +0 -3
  33. package/dist/assets/diagram-LBJQPF4R-cH8DVJ6C.js +0 -24
  34. package/dist/assets/diagram-Q27KOJAE-8JJAGHRF.js +0 -24
  35. package/dist/assets/diagram-UB23O5K3-BGCDqdpG.js +0 -41
  36. package/dist/assets/disconnected-BuxohaUu.png +0 -0
  37. package/dist/assets/ebnfDiagram-BXEA7PRR-r2bgA64b.js +0 -1
  38. package/dist/assets/echarts-BB8VCqSB.js +0 -73
  39. package/dist/assets/erDiagram-JOGREHBK-BExdsKTd.js +0 -85
  40. package/dist/assets/flowDiagram-UKHOOZJN-B8wwUqLz.js +0 -156
  41. package/dist/assets/ganttDiagram-PKOTCBZU-SViiTCQN.js +0 -292
  42. package/dist/assets/gitGraphDiagram-DS77QQ5N-CmktWysd.js +0 -106
  43. package/dist/assets/graph-C9eacEi8.js +0 -1
  44. package/dist/assets/index-CizlQbSv.css +0 -13
  45. package/dist/assets/index-CrLoQPpq.js +0 -124
  46. package/dist/assets/infoDiagram-6WML65LV-BwUFVmXD.js +0 -2
  47. package/dist/assets/ishikawaDiagram-WSZJBQD7-Df6P2A6T.js +0 -70
  48. package/dist/assets/journeyDiagram-NVQOT4AX-Cjk4fifu.js +0 -139
  49. package/dist/assets/kanban-definition-27J2QSJJ-BcoyAznM.js +0 -89
  50. package/dist/assets/katex-C5jXJg4s.js +0 -257
  51. package/dist/assets/layout-DEXfKzaS.js +0 -1
  52. package/dist/assets/logo-DIAzbBuw.png +0 -0
  53. package/dist/assets/map-Czzmt4hB.js +0 -1
  54. package/dist/assets/materialdesignicons-webfont-B7mPwVP_.ttf +0 -0
  55. package/dist/assets/materialdesignicons-webfont-CSr8KVlo.eot +0 -0
  56. package/dist/assets/materialdesignicons-webfont-Dp5v-WZN.woff2 +0 -0
  57. package/dist/assets/materialdesignicons-webfont-PXm3-2wK.woff +0 -0
  58. package/dist/assets/mermaid-CX4mRs5N.js +0 -314
  59. package/dist/assets/mindmap-definition-FAOFIHXS-D6njotiS.js +0 -96
  60. package/dist/assets/pegDiagram-VL7TDLO6-CaA_iXxT.js +0 -1
  61. package/dist/assets/pieDiagram-7S7Q4E2Y-aYh5694F.js +0 -39
  62. package/dist/assets/quadrantDiagram-CIZ2JOQS-CaWyb4Jw.js +0 -7
  63. package/dist/assets/railroadDiagram-AXF67PYL-Bd_vMLsE.js +0 -1
  64. package/dist/assets/requirementDiagram-LRYGKXZP-CMxISoyd.js +0 -84
  65. package/dist/assets/sankeyDiagram-W5VNT64P-DLbFAyXe.js +0 -40
  66. package/dist/assets/sequenceDiagram-SI44F4Z6-CzdhMpvP.js +0 -162
  67. package/dist/assets/sizeCapture-X5ZJPWSS-CnezfYZ6.js +0 -1
  68. package/dist/assets/stateDiagram-OKZ733FA-5R9RLDEM.js +0 -1
  69. package/dist/assets/stateDiagram-v2-UEYNNEHI-Ck4l-gcT.js +0 -1
  70. package/dist/assets/swimlanes-SLNWSIFB-CeEnGZwJ.js +0 -2
  71. package/dist/assets/swimlanesDiagram-ULZ7WXOC-DSebamlh.js +0 -8
  72. package/dist/assets/timeline-definition-Z64GVDOM-ZMWCENQJ.js +0 -120
  73. package/dist/assets/vennDiagram-T6HMQDX7-DVr1jz1I.js +0 -34
  74. package/dist/assets/vue-vendor-Bmy9n80X.js +0 -49
  75. package/dist/assets/wardleyDiagram-T6FBY63Y-DNp6yzs5.js +0 -78
  76. package/dist/assets/workbox-window.prod.es5-BIl4cyR9.js +0 -2
  77. package/dist/assets/xychartDiagram-ELKLHX3M-DC4NZzl1.js +0 -7
  78. package/dist/favicon.ico +0 -0
  79. package/dist/favicon.svg +0 -482
  80. package/dist/index.html +0 -24
  81. package/dist/logo-512x512.png +0 -0
  82. package/dist/logo.svg +0 -482
  83. package/dist/maskable-icon-512x512.png +0 -0
  84. package/dist/pwa-192x192.png +0 -0
  85. package/dist/pwa-512x512.png +0 -0
  86. package/dist/pwa-64x64.png +0 -0
  87. package/dist/sw.js +0 -2
@@ -1,292 +0,0 @@
1
- import{aF as _t,aG as Dt,g as fe,s as he,o as me,n as ke,a as ye,b as ge,_ as l,c as dt,d as pt,aI as ve,aJ as pe,aK as Te,e as xe,J as be,aL as we,aM as q,l as ot,aN as _e,aO as Ht,aP as Bt,aQ as De,aR as Se,aS as Ce,aT as Me,aU as Ee,aV as Ie,aW as Ye,aX as Gt,aY as jt,aZ as Xt,a_ as Ut,a$ as qt,b0 as $e,k as Le,j as Ae,p as Fe,y as Oe}from"./mermaid-CX4mRs5N.js";var Kt={exports:{}};(function(t,i){(function(r,e){t.exports=e()})(_t,(function(){var r="day";return function(e,a,g){var v=function(A){return A.add(4-A.isoWeekday(),r)},b=a.prototype;b.isoWeekYear=function(){return v(this).year()},b.isoWeek=function(A){if(!this.$utils().u(A))return this.add(7*(A-this.isoWeek()),r);var w,P,F,R,X=v(this),z=(w=this.isoWeekYear(),P=this.$u,F=(P?g.utc:g)().year(w).startOf("year"),R=4-F.isoWeekday(),F.isoWeekday()>4&&(R+=7),F.add(R,r));return X.diff(z,"week")+1},b.isoWeekday=function(A){return this.$utils().u(A)?this.day()||7:this.day(this.day()%7?A:A-7)};var L=b.startOf;b.startOf=function(A,w){var P=this.$utils(),F=!!P.u(w)||w;return P.p(A)==="isoweek"?F?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):L.bind(this)(A,w)}}}))})(Kt);var We=Kt.exports;const Pe=Dt(We);var te={exports:{}};(function(t,i){(function(r,e){t.exports=e()})(_t,(function(){var r={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,a=/\d/,g=/\d\d/,v=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,L={},A=function(k){return(k=+k)+(k>68?1900:2e3)},w=function(k){return function(E){this[k]=+E}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=(function(E){if(!E||E==="Z")return 0;var O=E.match(/([+-]|\d\d)/g),$=60*O[1]+(+O[2]||0);return $===0?0:O[0]==="+"?-$:$})(k)}],F=function(k){var E=L[k];return E&&(E.indexOf?E:E.s.concat(E.f))},R=function(k,E){var O,$=L.meridiem;if($){for(var U=1;U<=24;U+=1)if(k.indexOf($(U,0,E))>-1){O=U>12;break}}else O=k===(E?"pm":"PM");return O},X={A:[b,function(k){this.afternoon=R(k,!1)}],a:[b,function(k){this.afternoon=R(k,!0)}],Q:[a,function(k){this.month=3*(k-1)+1}],S:[a,function(k){this.milliseconds=100*+k}],SS:[g,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[v,w("seconds")],ss:[v,w("seconds")],m:[v,w("minutes")],mm:[v,w("minutes")],H:[v,w("hours")],h:[v,w("hours")],HH:[v,w("hours")],hh:[v,w("hours")],D:[v,w("day")],DD:[g,w("day")],Do:[b,function(k){var E=L.ordinal,O=k.match(/\d+/);if(this.day=O[0],E)for(var $=1;$<=31;$+=1)E($).replace(/\[|\]/g,"")===k&&(this.day=$)}],w:[v,w("week")],ww:[g,w("week")],M:[v,w("month")],MM:[g,w("month")],MMM:[b,function(k){var E=F("months"),O=(F("monthsShort")||E.map((function($){return $.slice(0,3)}))).indexOf(k)+1;if(O<1)throw new Error;this.month=O%12||O}],MMMM:[b,function(k){var E=F("months").indexOf(k)+1;if(E<1)throw new Error;this.month=E%12||E}],Y:[/[+-]?\d+/,w("year")],YY:[g,function(k){this.year=A(k)}],YYYY:[/\d{4}/,w("year")],Z:P,ZZ:P};function z(k){var E,O;E=k,O=L&&L.formats;for(var $=(k=E.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(m,T,p){var y=p&&p.toUpperCase();return T||O[p]||r[p]||O[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(n,d,f){return d||f.slice(1)}))}))).match(e),U=$.length,B=0;B<U;B+=1){var Y=$[B],x=X[Y],h=x&&x[0],I=x&&x[1];$[B]=I?{regex:h,parser:I}:Y.replace(/^\[|\]$/g,"")}return function(m){for(var T={},p=0,y=0;p<U;p+=1){var n=$[p];if(typeof n=="string")y+=n.length;else{var d=n.regex,f=n.parser,u=m.slice(y),_=d.exec(u)[0];f.call(T,_),m=m.replace(_,"")}}return(function(s){var D=s.afternoon;if(D!==void 0){var o=s.hours;D?o<12&&(s.hours+=12):o===12&&(s.hours=0),delete s.afternoon}})(T),T}}return function(k,E,O){O.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(A=k.parseTwoDigitYear);var $=E.prototype,U=$.parse;$.parse=function(B){var Y=B.date,x=B.utc,h=B.args;this.$u=x;var I=h[1];if(typeof I=="string"){var m=h[2]===!0,T=h[3]===!0,p=m||T,y=h[2];T&&(y=h[2]),L=this.$locale(),!m&&y&&(L=O.Ls[y]),this.$d=(function(u,_,s,D){try{if(["x","X"].indexOf(_)>-1)return new Date((_==="X"?1e3:1)*u);var o=z(_)(u),H=o.year,c=o.month,S=o.day,C=o.hours,V=o.minutes,M=o.seconds,N=o.milliseconds,W=o.zone,it=o.week,nt=new Date,yt=S||(H||c?1:nt.getDate()),lt=H||nt.getFullYear(),G=0;H&&!c||(G=c>0?c-1:nt.getMonth());var J,Z=C||0,at=V||0,K=M||0,rt=N||0;return W?new Date(Date.UTC(lt,G,yt,Z,at,K,rt+60*W.offset*1e3)):s?new Date(Date.UTC(lt,G,yt,Z,at,K,rt)):(J=new Date(lt,G,yt,Z,at,K,rt),it&&(J=D(J).week(it).toDate()),J)}catch{return new Date("")}})(Y,I,x,O),this.init(),y&&y!==!0&&(this.$L=this.locale(y).$L),p&&Y!=this.format(I)&&(this.$d=new Date("")),L={}}else if(I instanceof Array)for(var n=I.length,d=1;d<=n;d+=1){h[1]=I[d-1];var f=O.apply(this,h);if(f.isValid()){this.$d=f.$d,this.$L=f.$L,this.init();break}d===n&&(this.$d=new Date(""))}else U.call(this,B)}}}))})(te);var Ve=te.exports;const Re=Dt(Ve);var ee={exports:{}};(function(t,i){(function(r,e){t.exports=e()})(_t,(function(){return function(r,e){var a=e.prototype,g=a.format;a.format=function(v){var b=this,L=this.$locale();if(!this.isValid())return g.bind(this)(v);var A=this.$utils(),w=(v||"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(P){switch(P){case"Q":return Math.ceil((b.$M+1)/3);case"Do":return L.ordinal(b.$D);case"gggg":return b.weekYear();case"GGGG":return b.isoWeekYear();case"wo":return L.ordinal(b.week(),"W");case"w":case"ww":return A.s(b.week(),P==="w"?1:2,"0");case"W":case"WW":return A.s(b.isoWeek(),P==="W"?1:2,"0");case"k":case"kk":return A.s(String(b.$H===0?24:b.$H),P==="k"?1:2,"0");case"X":return Math.floor(b.$d.getTime()/1e3);case"x":return b.$d.getTime();case"z":return"["+b.offsetName()+"]";case"zzz":return"["+b.offsetName("long")+"]";default:return P}}));return g.bind(this)(w)}}}))})(ee);var Ne=ee.exports;const ze=Dt(Ne);var se={exports:{}};(function(t,i){(function(r,e){t.exports=e()})(_t,(function(){var r,e,a=1e3,g=6e4,v=36e5,b=864e5,L=31536e6,A=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,P=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,F={years:L,months:A,days:b,hours:v,minutes:g,seconds:a,milliseconds:1,weeks:6048e5},R=function(Y){return Y instanceof U},X=function(Y,x,h){return new U(Y,h,x.$l)},z=function(Y){return e.p(Y)+"s"},k=function(Y){return Y<0},E=function(Y){return k(Y)?Math.ceil(Y):Math.floor(Y)},O=function(Y){return Math.abs(Y)},$=function(Y,x){return Y?k(Y)?{negative:!0,format:""+O(Y)+x}:{negative:!1,format:""+Y+x}:{negative:!1,format:""}},U=(function(){function Y(h,I,m){var T=this;if(this.$d={},this.$l=m,h===void 0&&(this.$ms=0,this.parseFromMilliseconds()),I)return X(h*F[z(I)],this);if(typeof h=="number")return this.$ms=h,this.parseFromMilliseconds(),this;if(typeof h=="object")return Object.keys(h).forEach((function(n){T.$d[z(n)]=h[n]})),this.calMilliseconds(),this;if(typeof h=="string"){var p=h.match(w);if(p){var y=p.slice(2).map((function(n){return n!=null?Number(n):0}));return this.$d.years=y[0],this.$d.months=y[1],this.$d.weeks=y[2],this.$d.days=y[3],this.$d.hours=y[4],this.$d.minutes=y[5],this.$d.seconds=y[6],this.calMilliseconds(),this}}return this}var x=Y.prototype;return x.calMilliseconds=function(){var h=this;this.$ms=Object.keys(this.$d).reduce((function(I,m){return I+(h.$d[m]||0)*F[m]}),0)},x.parseFromMilliseconds=function(){var h=this.$ms;this.$d.years=E(h/L),h%=L,this.$d.months=E(h/A),h%=A,this.$d.days=E(h/b),h%=b,this.$d.hours=E(h/v),h%=v,this.$d.minutes=E(h/g),h%=g,this.$d.seconds=E(h/a),h%=a,this.$d.milliseconds=h},x.toISOString=function(){var h=$(this.$d.years,"Y"),I=$(this.$d.months,"M"),m=+this.$d.days||0;this.$d.weeks&&(m+=7*this.$d.weeks);var T=$(m,"D"),p=$(this.$d.hours,"H"),y=$(this.$d.minutes,"M"),n=this.$d.seconds||0;this.$d.milliseconds&&(n+=this.$d.milliseconds/1e3,n=Math.round(1e3*n)/1e3);var d=$(n,"S"),f=h.negative||I.negative||T.negative||p.negative||y.negative||d.negative,u=p.format||y.format||d.format?"T":"",_=(f?"-":"")+"P"+h.format+I.format+T.format+u+p.format+y.format+d.format;return _==="P"||_==="-P"?"P0D":_},x.toJSON=function(){return this.toISOString()},x.format=function(h){var I=h||"YYYY-MM-DDTHH:mm:ss",m={Y:this.$d.years,YY:e.s(this.$d.years,2,"0"),YYYY:e.s(this.$d.years,4,"0"),M:this.$d.months,MM:e.s(this.$d.months,2,"0"),D:this.$d.days,DD:e.s(this.$d.days,2,"0"),H:this.$d.hours,HH:e.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:e.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:e.s(this.$d.seconds,2,"0"),SSS:e.s(this.$d.milliseconds,3,"0")};return I.replace(P,(function(T,p){return p||String(m[T])}))},x.as=function(h){return this.$ms/F[z(h)]},x.get=function(h){var I=this.$ms,m=z(h);return m==="milliseconds"?I%=1e3:I=m==="weeks"?E(I/F[m]):this.$d[m],I||0},x.add=function(h,I,m){var T;return T=I?h*F[z(I)]:R(h)?h.$ms:X(h,this).$ms,X(this.$ms+T*(m?-1:1),this)},x.subtract=function(h,I){return this.add(h,I,!0)},x.locale=function(h){var I=this.clone();return I.$l=h,I},x.clone=function(){return X(this.$ms,this)},x.humanize=function(h){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!h)},x.valueOf=function(){return this.asMilliseconds()},x.milliseconds=function(){return this.get("milliseconds")},x.asMilliseconds=function(){return this.as("milliseconds")},x.seconds=function(){return this.get("seconds")},x.asSeconds=function(){return this.as("seconds")},x.minutes=function(){return this.get("minutes")},x.asMinutes=function(){return this.as("minutes")},x.hours=function(){return this.get("hours")},x.asHours=function(){return this.as("hours")},x.days=function(){return this.get("days")},x.asDays=function(){return this.as("days")},x.weeks=function(){return this.get("weeks")},x.asWeeks=function(){return this.as("weeks")},x.months=function(){return this.get("months")},x.asMonths=function(){return this.as("months")},x.years=function(){return this.get("years")},x.asYears=function(){return this.as("years")},Y})(),B=function(Y,x,h){return Y.add(x.years()*h,"y").add(x.months()*h,"M").add(x.days()*h,"d").add(x.hours()*h,"h").add(x.minutes()*h,"m").add(x.seconds()*h,"s").add(x.milliseconds()*h,"ms")};return function(Y,x,h){r=h,e=h().$utils(),h.duration=function(T,p){var y=h.locale();return X(T,{$l:y},p)},h.isDuration=R;var I=x.prototype.add,m=x.prototype.subtract;x.prototype.add=function(T,p){return R(T)?B(this,T,1):I.bind(this)(T,p)},x.prototype.subtract=function(T,p){return R(T)?B(this,T,-1):m.bind(this)(T,p)}}}))})(se);var He=se.exports;const Be=Dt(He);var Mt=(function(){var t=l(function(y,n,d,f){for(d=d||{},f=y.length;f--;d[y[f]]=n);return d},"o"),i=[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],r=[1,26],e=[1,27],a=[1,28],g=[1,29],v=[1,30],b=[1,31],L=[1,32],A=[1,33],w=[1,34],P=[1,9],F=[1,10],R=[1,11],X=[1,12],z=[1,13],k=[1,14],E=[1,15],O=[1,16],$=[1,19],U=[1,20],B=[1,21],Y=[1,22],x=[1,23],h=[1,25],I=[1,35],m={trace:l(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:l(function(n,d,f,u,_,s,D){var o=s.length-1;switch(_){case 1:return s[o-1];case 2:this.$=[];break;case 3:s[o-1].push(s[o]),this.$=s[o-1];break;case 4:case 5:this.$=s[o];break;case 6:case 7:this.$=[];break;case 8:u.setWeekday("monday");break;case 9:u.setWeekday("tuesday");break;case 10:u.setWeekday("wednesday");break;case 11:u.setWeekday("thursday");break;case 12:u.setWeekday("friday");break;case 13:u.setWeekday("saturday");break;case 14:u.setWeekday("sunday");break;case 15:u.setWeekend("friday");break;case 16:u.setWeekend("saturday");break;case 17:u.setDateFormat(s[o].substr(11)),this.$=s[o].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=s[o].substr(18);break;case 19:u.TopAxis(),this.$=s[o].substr(8);break;case 20:u.setAxisFormat(s[o].substr(11)),this.$=s[o].substr(11);break;case 21:u.setTickInterval(s[o].substr(13)),this.$=s[o].substr(13);break;case 22:u.setExcludes(s[o].substr(9)),this.$=s[o].substr(9);break;case 23:u.setIncludes(s[o].substr(9)),this.$=s[o].substr(9);break;case 24:u.setTodayMarker(s[o].substr(12)),this.$=s[o].substr(12);break;case 27:u.setDiagramTitle(s[o].substr(6)),this.$=s[o].substr(6);break;case 28:this.$=s[o].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=s[o].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(s[o].substr(8)),this.$=s[o].substr(8);break;case 33:u.addTask(s[o-1],s[o]),this.$="task";break;case 34:this.$=s[o-1],u.setClickEvent(s[o-1],s[o],null);break;case 35:this.$=s[o-2],u.setClickEvent(s[o-2],s[o-1],s[o]);break;case 36:this.$=s[o-2],u.setClickEvent(s[o-2],s[o-1],null),u.setLink(s[o-2],s[o]);break;case 37:this.$=s[o-3],u.setClickEvent(s[o-3],s[o-2],s[o-1]),u.setLink(s[o-3],s[o]);break;case 38:this.$=s[o-2],u.setClickEvent(s[o-2],s[o],null),u.setLink(s[o-2],s[o-1]);break;case 39:this.$=s[o-3],u.setClickEvent(s[o-3],s[o-1],s[o]),u.setLink(s[o-3],s[o-2]);break;case 40:this.$=s[o-1],u.setLink(s[o-1],s[o]);break;case 41:case 47:this.$=s[o-1]+" "+s[o];break;case 42:case 43:case 45:this.$=s[o-2]+" "+s[o-1]+" "+s[o];break;case 44:case 46:this.$=s[o-3]+" "+s[o-2]+" "+s[o-1]+" "+s[o];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:e,14:a,15:g,16:v,17:b,18:L,19:18,20:A,21:w,22:P,23:F,24:R,25:X,26:z,27:k,28:E,29:O,30:$,31:U,33:B,35:Y,36:x,37:24,38:h,40:I},t(i,[2,7],{1:[2,1]}),t(i,[2,3]),{9:36,11:17,12:r,13:e,14:a,15:g,16:v,17:b,18:L,19:18,20:A,21:w,22:P,23:F,24:R,25:X,26:z,27:k,28:E,29:O,30:$,31:U,33:B,35:Y,36:x,37:24,38:h,40:I},t(i,[2,5]),t(i,[2,6]),t(i,[2,17]),t(i,[2,18]),t(i,[2,19]),t(i,[2,20]),t(i,[2,21]),t(i,[2,22]),t(i,[2,23]),t(i,[2,24]),t(i,[2,25]),t(i,[2,26]),t(i,[2,27]),{32:[1,37]},{34:[1,38]},t(i,[2,30]),t(i,[2,31]),t(i,[2,32]),{39:[1,39]},t(i,[2,8]),t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),t(i,[2,12]),t(i,[2,13]),t(i,[2,14]),t(i,[2,15]),t(i,[2,16]),{41:[1,40],43:[1,41]},t(i,[2,4]),t(i,[2,28]),t(i,[2,29]),t(i,[2,33]),t(i,[2,34],{42:[1,42],43:[1,43]}),t(i,[2,40],{41:[1,44]}),t(i,[2,35],{43:[1,45]}),t(i,[2,36]),t(i,[2,38],{42:[1,46]}),t(i,[2,37]),t(i,[2,39])],defaultActions:{},parseError:l(function(n,d){if(d.recoverable)this.trace(n);else{var f=new Error(n);throw f.hash=d,f}},"parseError"),parse:l(function(n){var d=this,f=[0],u=[],_=[null],s=[],D=this.table,o="",H=0,c=0,S=2,C=1,V=s.slice.call(arguments,1),M=Object.create(this.lexer),N={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(N.yy[W]=this.yy[W]);M.setInput(n,N.yy),N.yy.lexer=M,N.yy.parser=this,typeof M.yylloc>"u"&&(M.yylloc={});var it=M.yylloc;s.push(it);var nt=M.options&&M.options.ranges;typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function yt(Q){f.length=f.length-2*Q,_.length=_.length-Q,s.length=s.length-Q}l(yt,"popStack");function lt(){var Q;return Q=u.pop()||M.lex()||C,typeof Q!="number"&&(Q instanceof Array&&(u=Q,Q=u.pop()),Q=d.symbols_[Q]||Q),Q}l(lt,"lex");for(var G,J,Z,at,K={},rt,tt,zt,vt;;){if(J=f[f.length-1],this.defaultActions[J]?Z=this.defaultActions[J]:((G===null||typeof G>"u")&&(G=lt()),Z=D[J]&&D[J][G]),typeof Z>"u"||!Z.length||!Z[0]){var St="";vt=[];for(rt in D[J])this.terminals_[rt]&&rt>S&&vt.push("'"+this.terminals_[rt]+"'");M.showPosition?St="Parse error on line "+(H+1)+`:
2
- `+M.showPosition()+`
3
- Expecting `+vt.join(", ")+", got '"+(this.terminals_[G]||G)+"'":St="Parse error on line "+(H+1)+": Unexpected "+(G==C?"end of input":"'"+(this.terminals_[G]||G)+"'"),this.parseError(St,{text:M.match,token:this.terminals_[G]||G,line:M.yylineno,loc:it,expected:vt})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+G);switch(Z[0]){case 1:f.push(G),_.push(M.yytext),s.push(M.yylloc),f.push(Z[1]),G=null,c=M.yyleng,o=M.yytext,H=M.yylineno,it=M.yylloc;break;case 2:if(tt=this.productions_[Z[1]][1],K.$=_[_.length-tt],K._$={first_line:s[s.length-(tt||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(tt||1)].first_column,last_column:s[s.length-1].last_column},nt&&(K._$.range=[s[s.length-(tt||1)].range[0],s[s.length-1].range[1]]),at=this.performAction.apply(K,[o,c,H,N.yy,Z[1],_,s].concat(V)),typeof at<"u")return at;tt&&(f=f.slice(0,-1*tt*2),_=_.slice(0,-1*tt),s=s.slice(0,-1*tt)),f.push(this.productions_[Z[1]][0]),_.push(K.$),s.push(K._$),zt=D[f[f.length-2]][f[f.length-1]],f.push(zt);break;case 3:return!0}}return!0},"parse")},T=(function(){var y={EOF:1,parseError:l(function(d,f){if(this.yy.parser)this.yy.parser.parseError(d,f);else throw new Error(d)},"parseError"),setInput:l(function(n,d){return this.yy=d||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var d=n.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:l(function(n){var d=n.length,f=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var u=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),f.length-1&&(this.yylineno-=f.length-1);var _=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:f?(f.length===u.length?this.yylloc.first_column:0)+u[u.length-f.length].length-f[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
- `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(n){this.unput(this.match.slice(n))},"less"),pastInput:l(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var n=this.pastInput(),d=new Array(n.length+1).join("-");return n+this.upcomingInput()+`
5
- `+d+"^"},"showPosition"),test_match:l(function(n,d){var f,u,_;if(this.options.backtrack_lexer&&(_={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&&(_.yylloc.range=this.yylloc.range.slice(0))),u=n[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+n[0].length},this.yytext+=n[0],this.match+=n[0],this.matches=n,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(n[0].length),this.matched+=n[0],f=this.performAction.call(this,this.yy,this,d,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),f)return f;if(this._backtrack){for(var s in _)this[s]=_[s];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var n,d,f,u;this._more||(this.yytext="",this.match="");for(var _=this._currentRules(),s=0;s<_.length;s++)if(f=this._input.match(this.rules[_[s]]),f&&(!d||f[0].length>d[0].length)){if(d=f,u=s,this.options.backtrack_lexer){if(n=this.test_match(f,_[s]),n!==!1)return n;if(this._backtrack){d=!1;continue}else return!1}else if(!this.options.flex)break}return d?(n=this.test_match(d,_[u]),n!==!1?n:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
6
- `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:l(function(){var d=this.next();return d||this.lex()},"lex"),begin:l(function(d){this.conditionStack.push(d)},"begin"),popState:l(function(){var d=this.conditionStack.length-1;return d>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(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:l(function(d){return d=this.conditionStack.length-1-Math.abs(d||0),d>=0?this.conditionStack[d]:"INITIAL"},"topState"),pushState:l(function(d){this.begin(d)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(d,f,u,_){switch(u){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:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin("href");break;case 15:this.popState();break;case 16:return 43;case 17:this.begin("callbackname");break;case 18:this.popState();break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin("click");break;case 24:this.popState();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}}};return y})();m.lexer=T;function p(){this.yy={}}return l(p,"Parser"),p.prototype=m,m.Parser=p,new p})();Mt.parser=Mt;var Ge=Mt;q.extend(Pe);q.extend(Re);q.extend(ze);var Zt={friday:5,saturday:6},et="",$t="",Lt=void 0,At="",ht=[],mt=[],Ft=new Map,Ot=[],bt=[],kt="",Wt="",ie=["active","done","crit","milestone","vert"],Pt=[],ut="",gt=!1,Vt=!1,Rt="sunday",wt="saturday",Et=0,je=l(function(){Ot=[],bt=[],kt="",Pt=[],Tt=0,Yt=void 0,xt=void 0,j=[],et="",$t="",Wt="",Lt=void 0,At="",ht=[],mt=[],gt=!1,Vt=!1,Et=0,Ft=new Map,ut="",Fe(),Rt="sunday",wt="saturday"},"clear"),Xe=l(function(t){ut=t},"setDiagramId"),Ue=l(function(t){$t=t},"setAxisFormat"),qe=l(function(){return $t},"getAxisFormat"),Ze=l(function(t){Lt=t},"setTickInterval"),Qe=l(function(){return Lt},"getTickInterval"),Je=l(function(t){At=t},"setTodayMarker"),Ke=l(function(){return At},"getTodayMarker"),ts=l(function(t){et=t},"setDateFormat"),es=l(function(){gt=!0},"enableInclusiveEndDates"),ss=l(function(){return gt},"endDatesAreInclusive"),is=l(function(){Vt=!0},"enableTopAxis"),rs=l(function(){return Vt},"topAxisEnabled"),ns=l(function(t){Wt=t},"setDisplayMode"),as=l(function(){return Wt},"getDisplayMode"),os=l(function(){return et},"getDateFormat"),re=l((t,i)=>{const r=i.toLowerCase().split(/[\s,]+/).filter(e=>e!=="");return[...new Set([...t,...r])]},"mergeTokens"),cs=l(function(t){ht=re(ht,t)},"setIncludes"),ls=l(function(){return ht},"getIncludes"),us=l(function(t){mt=re(mt,t)},"setExcludes"),ds=l(function(){return mt},"getExcludes"),fs=l(function(){return Ft},"getLinks"),hs=l(function(t){kt=t,Ot.push(t)},"addSection"),ms=l(function(){return Ot},"getSections"),ks=l(function(){let t=Qt();const i=10;let r=0;for(;!t&&r<i;)t=Qt(),r++;return bt=j,bt},"getTasks"),ne=l(function(t,i,r,e){const a=t.format(i.trim()),g=t.format("YYYY-MM-DD");return e.includes(a)||e.includes(g)?!1:r.includes("weekends")&&(t.isoWeekday()===Zt[wt]||t.isoWeekday()===Zt[wt]+1)||r.includes(t.format("dddd").toLowerCase())?!0:r.includes(a)||r.includes(g)},"isInvalidDate"),ys=l(function(t){Rt=t},"setWeekday"),gs=l(function(){return Rt},"getWeekday"),vs=l(function(t){wt=t},"setWeekend"),ae=l(function(t,i,r,e){if(!r.length||t.manualEndTime)return;let a;t.startTime instanceof Date?a=q(t.startTime):a=q(t.startTime,i,!0),a=a.add(1,"d");let g;t.endTime instanceof Date?g=q(t.endTime):g=q(t.endTime,i,!0);const[v,b]=ps(a,g,i,r,e);t.endTime=v.toDate(),t.renderEndTime=b},"checkTaskDates"),ps=l(function(t,i,r,e,a){let g=!1,v=null;const b=i.add(1e4,"d");for(;t<=i;){if(g||(v=i.toDate()),g=ne(t,r,e,a),g&&(i=i.add(1,"d"),i>b))throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");t=t.add(1,"d")}return[i,v]},"fixTaskDates"),It=l(function(t,i,r){if(r=r.trim(),l(b=>{const L=b.trim();return L==="x"||L==="X"},"isTimestampFormat")(i)&&/^\d+$/.test(r))return new Date(Number(r));const g=/^after\s+(?<ids>[\d\w- ]+)/.exec(r);if(g!==null){let b=null;for(const A of g.groups.ids.split(" ")){let w=ct(A);w!==void 0&&(!b||w.endTime>b.endTime)&&(b=w)}if(b)return b.endTime;const L=new Date;return L.setHours(0,0,0,0),L}let v=q(r,i.trim(),!0);if(v.isValid())return v.toDate();{ot.debug("Invalid date:"+r),ot.debug("With date format:"+i.trim());const b=new Date(r);if(b===void 0||isNaN(b.getTime())||b.getFullYear()<-1e4||b.getFullYear()>1e4)throw new Error("Invalid date:"+r);return b}},"getStartDate"),oe=l(function(t){const i=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return i!==null?[Number.parseFloat(i[1]),i[2]]:[NaN,"ms"]},"parseDuration"),ce=l(function(t,i,r,e=!1){r=r.trim();const g=/^until\s+(?<ids>[\d\w- ]+)/.exec(r);if(g!==null){let w=null;for(const F of g.groups.ids.split(" ")){let R=ct(F);R!==void 0&&(!w||R.startTime<w.startTime)&&(w=R)}if(w)return w.startTime;const P=new Date;return P.setHours(0,0,0,0),P}let v=q(r,i.trim(),!0);if(v.isValid())return e&&(v=v.add(1,"d")),v.toDate();let b=q(t);const[L,A]=oe(r);if(!Number.isNaN(L)){const w=b.add(L,A);w.isValid()&&(b=w)}return b.toDate()},"getEndDate"),Tt=0,ft=l(function(t){return t===void 0?(Tt=Tt+1,"task"+Tt):t},"parseId"),Ts=l(function(t,i){let r;i.substr(0,1)===":"?r=i.substr(1,i.length):r=i;const e=r.split(","),a={};Nt(e,a,ie);for(let v=0;v<e.length;v++)e[v]=e[v].trim();let g="";switch(e.length){case 1:a.id=ft(),a.startTime=t.endTime,g=e[0];break;case 2:a.id=ft(),a.startTime=It(void 0,et,e[0]),g=e[1];break;case 3:a.id=ft(e[0]),a.startTime=It(void 0,et,e[1]),g=e[2];break}return g&&(a.endTime=ce(a.startTime,et,g,gt),a.manualEndTime=q(g,"YYYY-MM-DD",!0).isValid(),ae(a,et,mt,ht)),a},"compileData"),xs=l(function(t,i){let r;i.substr(0,1)===":"?r=i.substr(1,i.length):r=i;const e=r.split(","),a={};Nt(e,a,ie);for(let g=0;g<e.length;g++)e[g]=e[g].trim();switch(e.length){case 1:a.id=ft(),a.startTime={type:"prevTaskEnd",id:t},a.endTime={data:e[0]};break;case 2:a.id=ft(),a.startTime={type:"getStartDate",startData:e[0]},a.endTime={data:e[1]};break;case 3:a.id=ft(e[0]),a.startTime={type:"getStartDate",startData:e[1]},a.endTime={data:e[2]};break}return a},"parseData"),Yt,xt,j=[],le={},bs=l(function(t,i){const r={section:kt,type:kt,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:i},task:t,classes:[]},e=xs(xt,i);r.raw.startTime=e.startTime,r.raw.endTime=e.endTime,r.id=e.id,r.prevTaskId=xt,r.active=e.active,r.done=e.done,r.crit=e.crit,r.milestone=e.milestone,r.vert=e.vert,r.vert?r.order=-1:(r.order=Et,Et++);const a=j.push(r);xt=r.id,le[r.id]=a-1},"addTask"),ct=l(function(t){const i=le[t];return j[i]},"findTaskById"),ws=l(function(t,i){const r={section:kt,type:kt,description:t,task:t,classes:[]},e=Ts(Yt,i);r.startTime=e.startTime,r.endTime=e.endTime,r.id=e.id,r.active=e.active,r.done=e.done,r.crit=e.crit,r.milestone=e.milestone,r.vert=e.vert,Yt=r,bt.push(r)},"addTaskOrg"),Qt=l(function(){const t=l(function(r){const e=j[r];let a="";switch(j[r].raw.startTime.type){case"prevTaskEnd":{const g=ct(e.prevTaskId);e.startTime=g.endTime;break}case"getStartDate":a=It(void 0,et,j[r].raw.startTime.startData),a&&(j[r].startTime=a);break}return j[r].startTime&&(j[r].endTime=ce(j[r].startTime,et,j[r].raw.endTime.data,gt),j[r].endTime&&(j[r].processed=!0,j[r].manualEndTime=q(j[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),ae(j[r],et,mt,ht))),j[r].processed},"compileTask");let i=!0;for(const[r,e]of j.entries())t(r),i=i&&e.processed;return i},"compileTasks"),_s=l(function(t,i){let r=i;dt().securityLevel!=="loose"&&(r=Ae(i)),t.split(",").forEach(function(e){ct(e)!==void 0&&(de(e,()=>{window.open(r,"_self")}),Ft.set(e,r))}),ue(t,"clickable")},"setLink"),ue=l(function(t,i){t.split(",").forEach(function(r){let e=ct(r);e!==void 0&&e.classes.push(i)})},"setClass"),Ds=l(function(t,i,r){if(dt().securityLevel!=="loose"||i===void 0)return;let e=[];if(typeof r=="string"){e=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let g=0;g<e.length;g++){let v=e[g].trim();v.startsWith('"')&&v.endsWith('"')&&(v=v.substr(1,v.length-2)),e[g]=v}}e.length===0&&e.push(t),ct(t)!==void 0&&de(t,()=>{Oe.runFunc(i,...e)})},"setClickFun"),de=l(function(t,i){Pt.push(function(){const r=ut?`${ut}-${t}`:t,e=document.querySelector(`[id="${r}"]`);e!==null&&e.addEventListener("click",function(){i()})},function(){const r=ut?`${ut}-${t}`:t,e=document.querySelector(`[id="${r}-text"]`);e!==null&&e.addEventListener("click",function(){i()})})},"pushFun"),Ss=l(function(t,i,r){t.split(",").forEach(function(e){Ds(e,i,r)}),ue(t,"clickable")},"setClickEvent"),Cs=l(function(t){Pt.forEach(function(i){i(t)})},"bindFunctions"),Ms={getConfig:l(()=>dt().gantt,"getConfig"),clear:je,setDateFormat:ts,getDateFormat:os,enableInclusiveEndDates:es,endDatesAreInclusive:ss,enableTopAxis:is,topAxisEnabled:rs,setAxisFormat:Ue,getAxisFormat:qe,setTickInterval:Ze,getTickInterval:Qe,setTodayMarker:Je,getTodayMarker:Ke,setAccTitle:ge,getAccTitle:ye,setDiagramTitle:ke,getDiagramTitle:me,setDiagramId:Xe,setDisplayMode:ns,getDisplayMode:as,setAccDescription:he,getAccDescription:fe,addSection:hs,getSections:ms,getTasks:ks,addTask:bs,findTaskById:ct,addTaskOrg:ws,setIncludes:cs,getIncludes:ls,setExcludes:us,getExcludes:ds,setClickEvent:Ss,setLink:_s,getLinks:fs,bindFunctions:Cs,parseDuration:oe,isInvalidDate:ne,setWeekday:ys,getWeekday:gs,setWeekend:vs};function Nt(t,i,r){let e=!0;for(;e;)e=!1,r.forEach(function(a){const g="^\\s*"+a+"\\s*$",v=new RegExp(g);t[0].match(v)&&(i[a]=!0,t.shift(1),e=!0)})}l(Nt,"getTaskTags");q.extend(Be);var Es=l(function(){ot.debug("Something is calling, setConf, remove the call")},"setConf"),Jt={monday:Ye,tuesday:Ie,wednesday:Ee,thursday:Me,friday:Ce,saturday:Se,sunday:De},Is=l((t,i)=>{let r=[...t].map(()=>-1/0),e=[...t].sort((g,v)=>g.startTime-v.startTime||g.order-v.order),a=0;for(const g of e)for(let v=0;v<r.length;v++)if(g.startTime>=r[v]){r[v]=g.endTime,g.order=v+i,v>a&&(a=v);break}return a},"getMaxIntersections"),st,Ct=1e4,Ys=l(function(t,i,r,e){const a=dt().gantt;e.db.setDiagramId(i);const g=dt().securityLevel;let v;g==="sandbox"&&(v=pt("#i"+i));const b=g==="sandbox"?pt(v.nodes()[0].contentDocument.body):pt("body"),L=g==="sandbox"?v.nodes()[0].contentDocument:document,A=L.getElementById(i);st=A.parentElement.offsetWidth,st===void 0&&(st=1200),a.useWidth!==void 0&&(st=a.useWidth);const w=e.db.getTasks(),P=w.filter(m=>!m.vert);let F=[];for(const m of P)F.push(m.type);F=I(F);const R={};let X=2*a.topPadding;if(e.db.getDisplayMode()==="compact"||a.displayMode==="compact"){const m={};for(const p of P)m[p.section]===void 0?m[p.section]=[p]:m[p.section].push(p);let T=0;for(const p of Object.keys(m)){const y=Is(m[p],T)+1;T+=y,X+=y*(a.barHeight+a.barGap),R[p]=y}}else{X+=P.length*(a.barHeight+a.barGap);for(const m of F)R[m]=P.filter(T=>T.type===m).length}A.setAttribute("viewBox","0 0 "+st+" "+X);const z=b.select(`[id="${i}"]`),k=ve().domain([pe(w,function(m){return m.startTime}),Te(w,function(m){return m.endTime})]).rangeRound([0,st-a.leftPadding-a.rightPadding]);function E(m,T){const p=m.startTime,y=T.startTime;let n=0;return p>y?n=1:p<y&&(n=-1),n}l(E,"taskCompare"),w.sort(E),O(w,st,X),xe(z,X,st,a.useMaxWidth),z.append("text").text(e.db.getDiagramTitle()).attr("x",st/2).attr("y",a.titleTopMargin).attr("class","titleText");function O(m,T,p){const y=a.barHeight,n=y+a.barGap,d=a.topPadding,f=a.leftPadding,u=be().domain([0,F.length]).range(["#00B9FA","#F95002"]).interpolate(we);U(n,d,f,T,p,m,e.db.getExcludes(),e.db.getIncludes()),Y(f,d,T,p),$(m,n,d,f,y,u,T),x(n,d),h(f,d,T,p)}l(O,"makeGantt");function $(m,T,p,y,n,d,f){m.sort((c,S)=>c.vert===S.vert?0:c.vert?1:-1);const u=m.filter(c=>!c.vert),s=[...new Set(u.map(c=>c.order))].map(c=>u.find(S=>S.order===c));z.append("g").selectAll("rect").data(s).enter().append("rect").attr("x",0).attr("y",function(c,S){return S=c.order,S*T+p-2}).attr("width",function(){return f-a.rightPadding/2}).attr("height",T).attr("class",function(c){for(const[S,C]of F.entries())if(c.type===C)return"section section"+S%a.numberSectionStyles;return"section section0"}).enter();const D=z.append("g").selectAll("rect").data(m).enter(),o=e.db.getLinks();if(D.append("rect").attr("id",function(c){return i+"-"+c.id}).attr("rx",3).attr("ry",3).attr("x",function(c){return c.milestone?k(c.startTime)+y+.5*(k(c.endTime)-k(c.startTime))-.5*n:k(c.startTime)+y}).attr("y",function(c,S){return S=c.order,c.vert?a.gridLineStartPadding:S*T+p}).attr("width",function(c){return c.milestone?n:c.vert?.08*n:k(c.renderEndTime||c.endTime)-k(c.startTime)}).attr("height",function(c){return c.vert?u.length*(a.barHeight+a.barGap)+a.barHeight*2:n}).attr("transform-origin",function(c,S){return S=c.order,(k(c.startTime)+y+.5*(k(c.endTime)-k(c.startTime))).toString()+"px "+(S*T+p+.5*n).toString()+"px"}).attr("class",function(c){const S="task";let C="";c.classes.length>0&&(C=c.classes.join(" "));let V=0;for(const[N,W]of F.entries())c.type===W&&(V=N%a.numberSectionStyles);let M="";return c.active?c.crit?M+=" activeCrit":M=" active":c.done?c.crit?M=" doneCrit":M=" done":c.crit&&(M+=" crit"),M.length===0&&(M=" task"),c.milestone&&(M=" milestone "+M),c.vert&&(M=" vert "+M),M+=V,M+=" "+C,S+M}),D.append("text").attr("id",function(c){return i+"-"+c.id+"-text"}).text(function(c){return c.task}).attr("font-size",a.fontSize).attr("x",function(c){let S=k(c.startTime),C=k(c.renderEndTime||c.endTime);if(c.milestone&&(S+=.5*(k(c.endTime)-k(c.startTime))-.5*n,C=S+n),c.vert)return k(c.startTime)+y;const V=this.getBBox().width;return V>C-S?C+V+1.5*a.leftPadding>f?S+y-5:C+y+5:(C-S)/2+S+y}).attr("y",function(c,S){return c.vert?a.gridLineStartPadding+u.length*(a.barHeight+a.barGap)+60:(S=c.order,S*T+a.barHeight/2+(a.fontSize/2-2)+p)}).attr("text-height",n).attr("class",function(c){const S=k(c.startTime);let C=k(c.endTime);c.milestone&&(C=S+n);const V=this.getBBox().width;let M="";c.classes.length>0&&(M=c.classes.join(" "));let N=0;for(const[it,nt]of F.entries())c.type===nt&&(N=it%a.numberSectionStyles);let W="";return c.active&&(c.crit?W="activeCritText"+N:W="activeText"+N),c.done?c.crit?W=W+" doneCritText"+N:W=W+" doneText"+N:c.crit&&(W=W+" critText"+N),c.milestone&&(W+=" milestoneText"),c.vert&&(W+=" vertText"),V>C-S?C+V+1.5*a.leftPadding>f?M+" taskTextOutsideLeft taskTextOutside"+N+" "+W:M+" taskTextOutsideRight taskTextOutside"+N+" "+W+" width-"+V:M+" taskText taskText"+N+" "+W+" width-"+V}),dt().securityLevel==="sandbox"){let c;c=pt("#i"+i);const S=c.nodes()[0].contentDocument;D.filter(function(C){return o.has(C.id)}).each(function(C){var V=S.querySelector("#"+CSS.escape(i+"-"+C.id)),M=S.querySelector("#"+CSS.escape(i+"-"+C.id+"-text"));const N=V.parentNode;var W=S.createElement("a");W.setAttribute("xlink:href",o.get(C.id)),W.setAttribute("target","_top"),N.appendChild(W),W.appendChild(V),W.appendChild(M)})}}l($,"drawRects");function U(m,T,p,y,n,d,f,u){if(f.length===0&&u.length===0)return;let _,s;for(const{startTime:C,endTime:V}of d)(_===void 0||C<_)&&(_=C),(s===void 0||V>s)&&(s=V);if(!_||!s)return;if(q(s).diff(q(_),"year")>5){ot.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}const D=e.db.getDateFormat(),o=[];let H=null,c=q(_);for(;c.valueOf()<=s;)e.db.isInvalidDate(c,D,f,u)?H?H.end=c:H={start:c,end:c}:H&&(o.push(H),H=null),c=c.add(1,"d");z.append("g").selectAll("rect").data(o).enter().append("rect").attr("id",C=>i+"-exclude-"+C.start.format("YYYY-MM-DD")).attr("x",C=>k(C.start.startOf("day"))+p).attr("y",a.gridLineStartPadding).attr("width",C=>k(C.end.endOf("day"))-k(C.start.startOf("day"))).attr("height",n-T-a.gridLineStartPadding).attr("transform-origin",function(C,V){return(k(C.start)+p+.5*(k(C.end)-k(C.start))).toString()+"px "+(V*m+.5*n).toString()+"px"}).attr("class","exclude-range")}l(U,"drawExcludeDays");function B(m,T,p,y){if(p<=0||m>T)return 1/0;const n=T-m,d=q.duration({[y??"day"]:p}).asMilliseconds();return d<=0?1/0:Math.ceil(n/d)}l(B,"getEstimatedTickCount");function Y(m,T,p,y){const n=e.db.getDateFormat(),d=e.db.getAxisFormat();let f;d?f=d:n==="D"?f="%d":f=a.axisFormat??"%Y-%m-%d";let u=_e(k).tickSize(-y+T+a.gridLineStartPadding).tickFormat(Ht(f));const s=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(e.db.getTickInterval()||a.tickInterval);if(s!==null){const D=parseInt(s[1],10);if(isNaN(D)||D<=0)ot.warn(`Invalid tick interval value: "${s[1]}". Skipping custom tick interval.`);else{const o=s[2],H=e.db.getWeekday()||a.weekday,c=k.domain(),S=c[0],C=c[1],V=B(S,C,D,o);if(V>Ct)ot.warn(`The tick interval "${D}${o}" would generate ${V} ticks, which exceeds the maximum allowed (${Ct}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(o){case"millisecond":u.ticks(qt.every(D));break;case"second":u.ticks(Ut.every(D));break;case"minute":u.ticks(Xt.every(D));break;case"hour":u.ticks(jt.every(D));break;case"day":u.ticks(Gt.every(D));break;case"week":u.ticks(Jt[H].every(D));break;case"month":u.ticks(Bt.every(D));break}}}if(z.append("g").attr("class","grid").attr("transform","translate("+m+", "+(y-50)+")").call(u).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),e.db.topAxisEnabled()||a.topAxis){let D=$e(k).tickSize(-y+T+a.gridLineStartPadding).tickFormat(Ht(f));if(s!==null){const o=parseInt(s[1],10);if(isNaN(o)||o<=0)ot.warn(`Invalid tick interval value: "${s[1]}". Skipping custom tick interval.`);else{const H=s[2],c=e.db.getWeekday()||a.weekday,S=k.domain(),C=S[0],V=S[1];if(B(C,V,o,H)<=Ct)switch(H){case"millisecond":D.ticks(qt.every(o));break;case"second":D.ticks(Ut.every(o));break;case"minute":D.ticks(Xt.every(o));break;case"hour":D.ticks(jt.every(o));break;case"day":D.ticks(Gt.every(o));break;case"week":D.ticks(Jt[c].every(o));break;case"month":D.ticks(Bt.every(o));break}}}z.append("g").attr("class","grid").attr("transform","translate("+m+", "+T+")").call(D).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}l(Y,"makeGrid");function x(m,T){let p=0;const y=Object.keys(R).map(n=>[n,R[n]]);z.append("g").selectAll("text").data(y).enter().append(function(n){const d=n[0].split(Le.lineBreakRegex),f=-(d.length-1)/2,u=L.createElementNS("http://www.w3.org/2000/svg","text");u.setAttribute("dy",f+"em");for(const[_,s]of d.entries()){const D=L.createElementNS("http://www.w3.org/2000/svg","tspan");D.setAttribute("alignment-baseline","central"),D.setAttribute("x","10"),_>0&&D.setAttribute("dy","1em"),D.textContent=s,u.appendChild(D)}return u}).attr("x",10).attr("y",function(n,d){if(d>0)for(let f=0;f<d;f++)return p+=y[d-1][1],n[1]*m/2+p*m+T;else return n[1]*m/2+T}).attr("font-size",a.sectionFontSize).attr("class",function(n){for(const[d,f]of F.entries())if(n[0]===f)return"sectionTitle sectionTitle"+d%a.numberSectionStyles;return"sectionTitle"})}l(x,"vertLabels");function h(m,T,p,y){const n=e.db.getTodayMarker();if(n==="off")return;const d=z.append("g").attr("class","today"),f=new Date,u=d.append("line");u.attr("x1",k(f)+m).attr("x2",k(f)+m).attr("y1",a.titleTopMargin).attr("y2",y-a.titleTopMargin).attr("class","today"),n!==""&&u.attr("style",n.replace(/,/g,";"))}l(h,"drawToday");function I(m){const T={},p=[];for(let y=0,n=m.length;y<n;++y)Object.prototype.hasOwnProperty.call(T,m[y])||(T[m[y]]=!0,p.push(m[y]));return p}l(I,"checkUnique")},"draw"),$s={setConf:Es,draw:Ys},Ls=l(t=>`
7
- .mermaid-main-font {
8
- font-family: ${t.fontFamily};
9
- }
10
-
11
- .exclude-range {
12
- fill: ${t.excludeBkgColor};
13
- }
14
-
15
- .section {
16
- stroke: none;
17
- opacity: 0.2;
18
- }
19
-
20
- .section0 {
21
- fill: ${t.sectionBkgColor};
22
- }
23
-
24
- .section2 {
25
- fill: ${t.sectionBkgColor2};
26
- }
27
-
28
- .section1,
29
- .section3 {
30
- fill: ${t.altSectionBkgColor};
31
- opacity: 0.2;
32
- }
33
-
34
- .sectionTitle0 {
35
- fill: ${t.titleColor};
36
- }
37
-
38
- .sectionTitle1 {
39
- fill: ${t.titleColor};
40
- }
41
-
42
- .sectionTitle2 {
43
- fill: ${t.titleColor};
44
- }
45
-
46
- .sectionTitle3 {
47
- fill: ${t.titleColor};
48
- }
49
-
50
- .sectionTitle {
51
- text-anchor: start;
52
- font-family: ${t.fontFamily};
53
- }
54
-
55
-
56
- /* Grid and axis */
57
-
58
- .grid .tick {
59
- stroke: ${t.gridColor};
60
- opacity: 0.8;
61
- shape-rendering: crispEdges;
62
- }
63
-
64
- .grid .tick text {
65
- font-family: ${t.fontFamily};
66
- fill: ${t.textColor};
67
- }
68
-
69
- .grid path {
70
- stroke-width: 0;
71
- }
72
-
73
-
74
- /* Today line */
75
-
76
- .today {
77
- fill: none;
78
- stroke: ${t.todayLineColor};
79
- stroke-width: 2px;
80
- }
81
-
82
-
83
- /* Task styling */
84
-
85
- /* Default task */
86
-
87
- .task {
88
- stroke-width: 2;
89
- }
90
-
91
- .taskText {
92
- text-anchor: middle;
93
- font-family: ${t.fontFamily};
94
- }
95
-
96
- .taskTextOutsideRight {
97
- fill: ${t.taskTextDarkColor};
98
- text-anchor: start;
99
- font-family: ${t.fontFamily};
100
- }
101
-
102
- .taskTextOutsideLeft {
103
- fill: ${t.taskTextDarkColor};
104
- text-anchor: end;
105
- }
106
-
107
-
108
- /* Special case clickable */
109
-
110
- .task.clickable {
111
- cursor: pointer;
112
- }
113
-
114
- .taskText.clickable {
115
- cursor: pointer;
116
- fill: ${t.taskTextClickableColor} !important;
117
- font-weight: bold;
118
- }
119
-
120
- .taskTextOutsideLeft.clickable {
121
- cursor: pointer;
122
- fill: ${t.taskTextClickableColor} !important;
123
- font-weight: bold;
124
- }
125
-
126
- .taskTextOutsideRight.clickable {
127
- cursor: pointer;
128
- fill: ${t.taskTextClickableColor} !important;
129
- font-weight: bold;
130
- }
131
-
132
-
133
- /* Specific task settings for the sections*/
134
-
135
- .taskText0,
136
- .taskText1,
137
- .taskText2,
138
- .taskText3 {
139
- fill: ${t.taskTextColor};
140
- }
141
-
142
- .task0,
143
- .task1,
144
- .task2,
145
- .task3 {
146
- fill: ${t.taskBkgColor};
147
- stroke: ${t.taskBorderColor};
148
- }
149
-
150
- .taskTextOutside0,
151
- .taskTextOutside2
152
- {
153
- fill: ${t.taskTextOutsideColor};
154
- }
155
-
156
- .taskTextOutside1,
157
- .taskTextOutside3 {
158
- fill: ${t.taskTextOutsideColor};
159
- }
160
-
161
-
162
- /* Active task */
163
-
164
- .active0,
165
- .active1,
166
- .active2,
167
- .active3 {
168
- fill: ${t.activeTaskBkgColor};
169
- stroke: ${t.activeTaskBorderColor};
170
- }
171
-
172
- .activeText0,
173
- .activeText1,
174
- .activeText2,
175
- .activeText3 {
176
- fill: ${t.taskTextDarkColor} !important;
177
- }
178
-
179
-
180
- /* Completed task */
181
-
182
- .done0,
183
- .done1,
184
- .done2,
185
- .done3 {
186
- stroke: ${t.doneTaskBorderColor};
187
- fill: ${t.doneTaskBkgColor};
188
- stroke-width: 2;
189
- }
190
-
191
- .doneText0,
192
- .doneText1,
193
- .doneText2,
194
- .doneText3 {
195
- fill: ${t.taskTextDarkColor} !important;
196
- }
197
-
198
- /* Done task text displayed outside the bar sits against the diagram background,
199
- not against the done-task bar, so it must use the outside/contrast color. */
200
- .doneText0.taskTextOutsideLeft,
201
- .doneText0.taskTextOutsideRight,
202
- .doneText1.taskTextOutsideLeft,
203
- .doneText1.taskTextOutsideRight,
204
- .doneText2.taskTextOutsideLeft,
205
- .doneText2.taskTextOutsideRight,
206
- .doneText3.taskTextOutsideLeft,
207
- .doneText3.taskTextOutsideRight {
208
- fill: ${t.taskTextOutsideColor} !important;
209
- }
210
-
211
-
212
- /* Tasks on the critical line */
213
-
214
- .crit0,
215
- .crit1,
216
- .crit2,
217
- .crit3 {
218
- stroke: ${t.critBorderColor};
219
- fill: ${t.critBkgColor};
220
- stroke-width: 2;
221
- }
222
-
223
- .activeCrit0,
224
- .activeCrit1,
225
- .activeCrit2,
226
- .activeCrit3 {
227
- stroke: ${t.critBorderColor};
228
- fill: ${t.activeTaskBkgColor};
229
- stroke-width: 2;
230
- }
231
-
232
- .doneCrit0,
233
- .doneCrit1,
234
- .doneCrit2,
235
- .doneCrit3 {
236
- stroke: ${t.critBorderColor};
237
- fill: ${t.doneTaskBkgColor};
238
- stroke-width: 2;
239
- cursor: pointer;
240
- shape-rendering: crispEdges;
241
- }
242
-
243
- .milestone {
244
- transform: rotate(45deg) scale(0.8,0.8);
245
- }
246
-
247
- .milestoneText {
248
- font-style: italic;
249
- }
250
- .doneCritText0,
251
- .doneCritText1,
252
- .doneCritText2,
253
- .doneCritText3 {
254
- fill: ${t.taskTextDarkColor} !important;
255
- }
256
-
257
- /* Done-crit task text outside the bar — same reasoning as doneText above. */
258
- .doneCritText0.taskTextOutsideLeft,
259
- .doneCritText0.taskTextOutsideRight,
260
- .doneCritText1.taskTextOutsideLeft,
261
- .doneCritText1.taskTextOutsideRight,
262
- .doneCritText2.taskTextOutsideLeft,
263
- .doneCritText2.taskTextOutsideRight,
264
- .doneCritText3.taskTextOutsideLeft,
265
- .doneCritText3.taskTextOutsideRight {
266
- fill: ${t.taskTextOutsideColor} !important;
267
- }
268
-
269
- .vert {
270
- stroke: ${t.vertLineColor};
271
- }
272
-
273
- .vertText {
274
- font-size: 15px;
275
- text-anchor: middle;
276
- fill: ${t.vertLineColor} !important;
277
- }
278
-
279
- .activeCritText0,
280
- .activeCritText1,
281
- .activeCritText2,
282
- .activeCritText3 {
283
- fill: ${t.taskTextDarkColor} !important;
284
- }
285
-
286
- .titleText {
287
- text-anchor: middle;
288
- font-size: 18px;
289
- fill: ${t.titleColor||t.textColor};
290
- font-family: ${t.fontFamily};
291
- }
292
- `,"getStyles"),As=Ls,Os={parser:Ge,db:Ms,renderer:$s,styles:As};export{Os as diagram};
@@ -1,106 +0,0 @@
1
- import{I as he}from"./chunk-2Q5K7J3B-DASHHxaC.js";import{p as $e}from"./chunk-JWPE2WC7-UNqcBwu_.js";import{o as fe,n as ge,s as ue,g as ye,a as xe,b as me,_ as $,z as Q,l as k,d as pe,c as z,y as be,A as we,p as ke,k as L,B as ve,C as Ce,D as Ee}from"./mermaid-CX4mRs5N.js";import{p as Be}from"./cynefin-VYW2F7L2-BDPznSFQ.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=Ce.gitGraph,D=$(()=>ve({...Te,...Q().gitGraph}),"getConfig"),i=new he(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ee({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),Ie=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Ae=$(function(){i.reset(),ke()},"clear"),Se=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),Pe=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),We=$(function(){return i.records.currBranch},"getCurrentBranch"),qe=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Re,commit:Ie,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Ae,getBranchesAsObjArray:Se,getBranches:De,getCommits:Pe,getCommitsArray:se,getCurrentBranch:We,getDirection:qe,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{$e(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Be("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,I=2,A=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),J=12,ee=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),S=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Qe=$(()=>{B.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Je.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${S(s,A,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${S(s,A,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${S(s,A,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${S(s,A,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-I).attr("y",t.y+13.5).attr("width",h.width+2*I).attr("height",h.height+2*I),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
2
- ${o-n/2-M/2},${u+I}
3
- ${o-n/2-M/2},${u-I}
4
- ${t.posWithOffset-n/2-M},${u-x-I}
5
- ${t.posWithOffset+n/2+M},${u-x-I}
6
- ${t.posWithOffset+n/2+M},${u+x+I}
7
- ${t.posWithOffset-n/2-M},${u+x+I}`),g.attr("cy",u).attr("cx",o-n/2+M/2).attr("r",1.5).attr("class","tag-hole"),y==="TB"||y==="BT"){const m=o+c;f.attr("class","tag-label-bkg").attr("points",`
8
- ${t.x},${m+2}
9
- ${t.x},${m-2}
10
- ${t.x+G},${m-x-2}
11
- ${t.x+G+n+4},${m-x-2}
12
- ${t.x+G+n+4},${m+x+2}
13
- ${t.x+G},${m+x+2}`).attr("transform","translate(12,12) rotate(45, "+t.x+","+o+")"),g.attr("cx",t.x+M/2).attr("cy",m).attr("transform","translate(12,12) rotate(45, "+t.x+","+o+")"),h.attr("x",t.x+5).attr("y",m+3).attr("transform","translate(14,14) rotate(45, "+t.x+","+o+")")}}}},"drawCommitTags"),ir=$(e=>{switch(e.customType??e.type){case p.NORMAL:return"commit-normal";case p.REVERSE:return"commit-reverse";case p.HIGHLIGHT:return"commit-highlight";case p.MERGE:return"commit-merge";case p.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),dr=$((e,r,t,o)=>{const s={x:0,y:0};if(e.parents.length>0){const d=ie(e.parents);if(d){const n=o.get(d)??s;return r==="TB"?n.y+H:r==="BT"?(o.get(e.id)??s).y-H:n.x+H}}else return r==="TB"?j:r==="BT"?(o.get(e.id)??s).y-H:0;return 0},"calculatePosition"),lr=$((e,r,t)=>{var l,h;const o=y==="BT"&&t?r:r+G,s=(l=B.get(e.branch))==null?void 0:l.pos,d=y==="TB"||y==="BT"?(h=B.get(e.branch))==null?void 0:h.pos:o;if(d===void 0||s===void 0)throw new Error(`Position were undefined for commit ${e.id}`);const n=V.has(z().theme??""),a=y==="TB"||y==="BT"?o:s+(n?J/2+1:-2);return{x:d,y:a,posWithOffset:o}},"getCommitPosition"),te=$((e,r,t,o)=>{const s=e.append("g").attr("class","commit-bullets"),d=e.append("g").attr("class","commit-labels");let n=y==="TB"||y==="BT"?j:0;const a=[...r.keys()],l=o.parallelCommits??!1,h=$((f,c)=>{var m,C;const x=(m=r.get(f))==null?void 0:m.seq,u=(C=r.get(c))==null?void 0:C.seq;return x!==void 0&&u!==void 0?x-u:0},"sortKeys");let g=a.sort(h);y==="BT"&&(l&&er(g,r,n),g=g.reverse()),g.forEach(f=>{var u;const c=r.get(f);if(!c)throw new Error(`Commit not found for key ${f}`);l&&(n=dr(c,y,n,T));const x=lr(c,n,l);if(t){const m=ir(c),C=c.customType??c.type,b=((u=B.get(c.branch))==null?void 0:u.index)??0;sr(s,c,x,m,b,C),or(d,c,x,n,o),cr(d,c,x,n)}y==="TB"||y==="BT"?T.set(c.id,{x:x.x,y:x.posWithOffset}):T.set(c.id,{x:x.posWithOffset,y:x.y}),n=y==="BT"&&l?n+H:n+H+G,n>O&&(O=n)})},"drawCommits"),hr=$((e,r,t,o,s)=>{const n=(y==="TB"||y==="BT"?t.x<o.x:t.y<o.y)?r.branch:e.branch,a=$(h=>h.branch===n,"isOnBranchToGetCurve"),l=$(h=>h.seq>e.seq&&h.seq<r.seq,"isBetweenCommits");return[...s.values()].some(h=>l(h)&&a(h))},"shouldRerouteArrow"),F=$((e,r,t=0)=>{const o=e+Math.abs(e-r)/2;if(t>5)return o;if(U.every(n=>Math.abs(n-o)>=10))return U.push(o),o;const d=Math.abs(e-r);return F(e,r-d/5,t+1)},"findLane"),$r=$((e,r,t,o)=>{var m,C,b,P,_;const{theme:s}=z(),d=ee.has(s??""),n=T.get(r.id),a=T.get(t.id);if(n===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${t.id}`);const l=hr(r,t,n,a,o);let h="",g="",f=0,c=0,x=(m=B.get(t.branch))==null?void 0:m.index;t.type===p.MERGE&&r.id!==t.parents[0]&&(x=(C=B.get(r.branch))==null?void 0:C.index);let u;if(l){h="A 10 10, 0, 0, 0,",g="A 10 10, 0, 0, 1,",f=10,c=10;const v=n.y<a.y?F(n.y,a.y):F(a.y,n.y),w=n.x<a.x?F(n.x,a.x):F(a.x,n.x);y==="TB"?n.x<a.x?u=`M ${n.x} ${n.y} L ${w-f} ${n.y} ${g} ${w} ${n.y+c} L ${w} ${a.y-f} ${h} ${w+c} ${a.y} L ${a.x} ${a.y}`:(x=(b=B.get(r.branch))==null?void 0:b.index,u=`M ${n.x} ${n.y} L ${w+f} ${n.y} ${h} ${w} ${n.y+c} L ${w} ${a.y-f} ${g} ${w-c} ${a.y} L ${a.x} ${a.y}`):y==="BT"?n.x<a.x?u=`M ${n.x} ${n.y} L ${w-f} ${n.y} ${h} ${w} ${n.y-c} L ${w} ${a.y+f} ${g} ${w+c} ${a.y} L ${a.x} ${a.y}`:(x=(P=B.get(r.branch))==null?void 0:P.index,u=`M ${n.x} ${n.y} L ${w+f} ${n.y} ${g} ${w} ${n.y-c} L ${w} ${a.y+f} ${h} ${w-c} ${a.y} L ${a.x} ${a.y}`):n.y<a.y?u=`M ${n.x} ${n.y} L ${n.x} ${v-f} ${h} ${n.x+c} ${v} L ${a.x-f} ${v} ${g} ${a.x} ${v+c} L ${a.x} ${a.y}`:(x=(_=B.get(r.branch))==null?void 0:_.index,u=`M ${n.x} ${n.y} L ${n.x} ${v+f} ${g} ${n.x+c} ${v} L ${a.x-f} ${v} ${h} ${a.x} ${v-c} L ${a.x} ${a.y}`)}else h="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",f=20,c=20,y==="TB"?(n.x<a.x&&(t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y-f} ${h} ${n.x+c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x-f} ${n.y} ${g} ${a.x} ${n.y+c} L ${a.x} ${a.y}`),n.x>a.x&&(h="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",f=20,c=20,t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y-f} ${g} ${n.x-c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x+f} ${n.y} ${h} ${a.x} ${n.y+c} L ${a.x} ${a.y}`),n.x===a.x&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`)):y==="BT"?(n.x<a.x&&(t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y+f} ${g} ${n.x+c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x-f} ${n.y} ${h} ${a.x} ${n.y-c} L ${a.x} ${a.y}`),n.x>a.x&&(h="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",f=20,c=20,t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y+f} ${h} ${n.x-c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x+f} ${n.y} ${g} ${a.x} ${n.y-c} L ${a.x} ${a.y}`),n.x===a.x&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`)):(n.y<a.y&&(t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${a.x-f} ${n.y} ${g} ${a.x} ${n.y+c} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${n.x} ${a.y-f} ${h} ${n.x+c} ${a.y} L ${a.x} ${a.y}`),n.y>a.y&&(t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${a.x-f} ${n.y} ${h} ${a.x} ${n.y-c} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${n.x} ${a.y+f} ${g} ${n.x+c} ${a.y} L ${a.x} ${a.y}`),n.y===a.y&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`));if(u===void 0)throw new Error("Line definition not found");e.append("path").attr("d",u).attr("class","arrow arrow"+S(x,A,d))},"drawArrow"),fr=$((e,r)=>{const t=e.append("g").attr("class","commit-arrows");[...r.keys()].forEach(o=>{const s=r.get(o);s.parents&&s.parents.length>0&&s.parents.forEach(d=>{$r(t,r.get(d),s,r)})})},"drawArrows"),gr=$((e,r,t,o)=>{const{look:s,theme:d,themeVariables:n}=z(),{dropShadow:a,THEME_COLOR_LIMIT:l}=n,h=V.has(d??""),g=ee.has(d??""),f=e.append("g");r.forEach((c,x)=>{var re;const u=S(x,h?l:A,g),m=(re=B.get(c.name))==null?void 0:re.pos;if(m===void 0)throw new Error(`Position not found for branch ${c.name}`);const C=y==="TB"||y==="BT"?m:h?m+J/2+1:m-2,b=f.append("line");b.attr("x1",0),b.attr("y1",C),b.attr("x2",O),b.attr("y2",C),b.attr("class","branch branch"+u),y==="TB"?(b.attr("y1",j),b.attr("x1",m),b.attr("y2",O),b.attr("x2",m)):y==="BT"&&(b.attr("y1",O),b.attr("x1",m),b.attr("y2",j),b.attr("x2",m)),U.push(C);const P=c.name,_=ce(P),v=f.insert("rect"),R=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+u);R.node().appendChild(_);const E=_.getBBox(),q=h?0:4,Y=h?16:0,W=h?J:0;s==="neo"&&v.attr("data-look","neo"),v.attr("class","branchLabelBkg label"+u).attr("style",s==="neo"?`filter:${h?`url(#${o}-drop-shadow)`:a}`:"").attr("rx",q).attr("ry",q).attr("x",-E.width-4-(t.rotateCommitLabel===!0?30:0)).attr("y",-E.height/2+10).attr("width",E.width+18+Y).attr("height",E.height+4+W),R.attr("transform","translate("+(-E.width-14-(t.rotateCommitLabel===!0?30:0)+Y/2)+", "+(C-E.height/2-2)+")"),y==="TB"?(v.attr("x",m-E.width/2-10).attr("y",0),R.attr("transform","translate("+(m-E.width/2-5)+", 0)"),h&&(v.attr("transform",`translate(${-Y/2-3}, ${-W-10})`),R.attr("transform","translate("+(m-E.width/2-5)+", "+(-W*2+7)+")"))):y==="BT"?(v.attr("x",m-E.width/2-10).attr("y",O),R.attr("transform","translate("+(m-E.width/2-5)+", "+O+")"),h&&(v.attr("transform",`translate(${-Y/2-3}, ${W+10})`),R.attr("transform","translate("+(m-E.width/2-5)+", "+(O+W*2+4)+")"))):v.attr("transform","translate(-19, "+(C-12-W/2)+")")})},"drawBranches"),ur=$(function(e,r,t,o,s){return B.set(e,{pos:r,index:t}),r+=50+(s?40:0)+(y==="TB"||y==="BT"?o.width/2:0),r},"setBranchPosition"),yr=$(function(e,r,t,o){Qe(),k.debug("in gitgraph renderer",e+`
14
- `,"id:",r,t);const s=o.db;if(!s.getConfig){k.error("getConfig method is not available on db");return}const d=s.getConfig(),n=d.rotateCommitLabel??!1;N=s.getCommits();const a=s.getBranchesAsObjArray();y=s.getDirection();const l=pe(`[id="${r}"]`),{look:h,theme:g,themeVariables:f}=z(),{useGradient:c,gradientStart:x,gradientStop:u,filterColor:m}=f;if(c){const b=l.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");b.append("stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),b.append("stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}h==="neo"&&V.has(g??"")&&l.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",m);let C=0;a.forEach((b,P)=>{var q;const _=ce(b.name),v=l.append("g"),w=v.insert("g").attr("class","branchLabel"),R=w.insert("g").attr("class","label branch-label");(q=R.node())==null||q.appendChild(_);const E=_.getBBox();C=ur(b.name,C,P,E,n),R.remove(),w.remove(),v.remove()}),te(l,N,!1,d),d.showBranches&&gr(l,a,d,r),fr(l,N),te(l,N,!0,d),be.insertTitle(l,"gitTitleText",d.titleTopMargin??0,s.getDiagramTitle()),we(void 0,l,d.diagramPadding,d.useMaxWidth)},"draw"),xr={draw:yr},de=8,le=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),mr=new Set(["redux-color","redux-dark-color"]),pr=new Set(["neo","neo-dark"]),br=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),wr=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),kr=$(e=>{const{svgId:r}=e;let t="";if(e.useGradient&&r)for(let o=0;o<e.THEME_COLOR_LIMIT;o++)t+=`
15
- .label${o} { fill: ${e.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${e.strokeWidth};}
16
- `;return t},"genGitGraphGradient"),vr=$(e=>{const r=Q(),{theme:t,themeVariables:o}=r,{borderColorArray:s}=o,d=le.has(t);if(pr.has(t)){let n="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)if(a===0)n+=`
17
- .branch-label${a} { fill: ${e.nodeBorder};}
18
- .commit${a} { stroke: ${e.nodeBorder}; }
19
- .commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
20
- .arrow${a} { stroke: ${e.nodeBorder}; }
21
- .commit-bullets { fill: ${e.nodeBorder}; }
22
- .commit-cherry-pick${a} { stroke: ${e.nodeBorder}; }
23
- ${kr(e)}`;else{const l=a%de;n+=`
24
- .branch-label${a} { fill: ${e["gitBranchLabel"+l]}; }
25
- .commit${a} { stroke: ${e["git"+l]}; fill: ${e["git"+l]}; }
26
- .commit-highlight${a} { stroke: ${e["gitInv"+l]}; fill: ${e["gitInv"+l]}; }
27
- .arrow${a} { stroke: ${e["git"+l]}; }
28
- `}return n}else if(mr.has(t)){let n="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)if(a===0)n+=`
29
- .branch-label${a} { fill: ${e.nodeBorder}; ${d?`font-weight:${e.noteFontWeight}`:""} }
30
- .commit${a} { stroke: ${e.nodeBorder}; }
31
- .commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.mainBkg}; }
32
- .label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${d?`font-weight:${e.noteFontWeight}`:""} }
33
- .arrow${a} { stroke: ${e.nodeBorder}; }
34
- .commit-bullets { fill: ${e.nodeBorder}; }
35
- `;else{const l=a%s.length;n+=`
36
- .branch-label${a} { fill: ${e.nodeBorder}; ${d?`font-weight:${e.noteFontWeight}`:""} }
37
- .commit${a} { stroke: ${s[l]}; fill: ${s[l]}; }
38
- .commit-highlight${a} { stroke: ${s[l]}; fill: ${s[l]}; }
39
- .label${a} { fill: ${br.has(t)?e.mainBkg:s[l]}; stroke: ${s[l]}; stroke-width: ${e.strokeWidth}; }
40
- .arrow${a} { stroke: ${s[l]}; }
41
- `}return n}else{let n="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)n+=`
42
- .branch-label${a} { fill: ${e.nodeBorder}; ${d?`font-weight:${e.noteFontWeight}`:""} }
43
- .commit${a} { stroke: ${e.nodeBorder}; }
44
- .commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
45
- .label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${d?`font-weight:${e.noteFontWeight}`:""}}
46
- .arrow${a} { stroke: ${e.nodeBorder}; }
47
- .commit-bullets { fill: ${e.nodeBorder}; }
48
- .commit-cherry-pick${a} { stroke: ${e.nodeBorder}; }
49
- `;return n}},"genColor"),Cr=$(e=>`${Array.from({length:e.THEME_COLOR_LIMIT},(r,t)=>t).map(r=>{const t=r%de;return`
50
- .branch-label${r} { fill: ${e["gitBranchLabel"+t]}; }
51
- .commit${r} { stroke: ${e["git"+t]}; fill: ${e["git"+t]}; }
52
- .commit-highlight${r} { stroke: ${e["gitInv"+t]}; fill: ${e["gitInv"+t]}; }
53
- .label${r} { fill: ${e["git"+t]}; }
54
- .arrow${r} { stroke: ${e["git"+t]}; }
55
- `}).join(`
56
- `)}`,"normalTheme"),Er=$(e=>{const r=Q(),{theme:t}=r,o=wr.has(t);return`
57
- .commit-id,
58
- .commit-msg,
59
- .branch-label {
60
- fill: lightgrey;
61
- color: lightgrey;
62
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
63
- font-family: var(--mermaid-font-family);
64
- }
65
-
66
- ${o?vr(e):Cr(e)}
67
-
68
- .branch {
69
- stroke-width: ${e.strokeWidth};
70
- stroke: ${e.commitLineColor??e.lineColor};
71
- stroke-dasharray: ${o?"4 2":"2"};
72
- }
73
- .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${o?e.nodeBorder:e.commitLabelColor}; ${o?`font-weight:${e.noteFontWeight};`:""}}
74
- .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${o?"transparent":e.commitLabelBackground}; opacity: ${o?"":.5}; }
75
- .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
76
- .tag-label-bkg { fill: ${o?e.mainBkg:e.tagLabelBackground}; stroke: ${o?e.nodeBorder:e.tagLabelBorder}; ${o?`filter:${e.dropShadow}`:""} }
77
- .tag-hole { fill: ${e.textColor}; }
78
-
79
- .commit-merge {
80
- stroke: ${o?e.mainBkg:e.primaryColor};
81
- fill: ${o?e.mainBkg:e.primaryColor};
82
- }
83
- .commit-reverse {
84
- stroke: ${o?e.mainBkg:e.primaryColor};
85
- fill: ${o?e.mainBkg:e.primaryColor};
86
- stroke-width: ${o?e.strokeWidth:3};
87
- }
88
- .commit-highlight-outer {
89
- }
90
- .commit-highlight-inner {
91
- stroke: ${o?e.mainBkg:e.primaryColor};
92
- fill: ${o?e.mainBkg:e.primaryColor};
93
- }
94
-
95
- .arrow {
96
- /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */
97
- stroke-width: ${le.has(t)?e.strokeWidth:8};
98
- stroke-linecap: round;
99
- fill: none
100
- }
101
- .gitTitleText {
102
- text-anchor: middle;
103
- font-size: 18px;
104
- fill: ${e.textColor};
105
- }
106
- `},"getStyles"),Br=Er,Ir={parser:Xe,db:oe,renderer:xr,styles:Br};export{Ir as diagram};
@@ -1 +0,0 @@
1
- var Ze=typeof global=="object"&&global&&global.Object===Object&&global,pt=typeof self=="object"&&self&&self.Object===Object&&self,w=Ze||pt||Function("return this")(),y=w.Symbol,We=Object.prototype,_t=We.hasOwnProperty,bt=We.toString,D=y?y.toStringTag:void 0;function yt(e){var t=_t.call(e,D),r=e[D];try{e[D]=void 0;var n=!0}catch{}var i=bt.call(e);return n&&(t?e[D]=r:delete e[D]),i}var vt=Object.prototype,Ot=vt.toString;function mt(e){return Ot.call(e)}var wt="[object Null]",Tt="[object Undefined]",Oe=y?y.toStringTag:void 0;function M(e){return e==null?e===void 0?Tt:wt:Oe&&Oe in Object(e)?yt(e):mt(e)}function j(e){return e!=null&&typeof e=="object"}var At="[object Symbol]";function he(e){return typeof e=="symbol"||j(e)&&M(e)==At}function Je(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}var g=Array.isArray,me=y?y.prototype:void 0,we=me?me.toString:void 0;function Qe(e){if(typeof e=="string")return e;if(g(e))return Je(e,Qe)+"";if(he(e))return we?we.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function ce(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function J(e){return e}var Pt="[object AsyncFunction]",Et="[object Function]",$t="[object GeneratorFunction]",St="[object Proxy]";function Z(e){if(!ce(e))return!1;var t=M(e);return t==Et||t==$t||t==Pt||t==St}var re=w["__core-js_shared__"],Te=(function(){var e=/[^.]+$/.exec(re&&re.keys&&re.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function Ct(e){return!!Te&&Te in e}var jt=Function.prototype,xt=jt.toString;function I(e){if(e!=null){try{return xt.call(e)}catch{}try{return e+""}catch{}}return""}var It=/[\\^$.*+?()[\]{}|]/g,Lt=/^\[object .+?Constructor\]$/,Rt=Function.prototype,Nt=Object.prototype,Mt=Rt.toString,Dt=Nt.hasOwnProperty,Ft=RegExp("^"+Mt.call(Dt).replace(It,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Gt(e){if(!ce(e)||Ct(e))return!1;var t=Z(e)?Ft:Lt;return t.test(I(e))}function Ut(e,t){return e==null?void 0:e[t]}function L(e,t){var r=Ut(e,t);return Gt(r)?r:void 0}var oe=L(w,"WeakMap");function zt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Ht(){}var Bt=800,Kt=16,qt=Date.now;function Xt(e){var t=0,r=0;return function(){var n=qt(),i=Kt-(n-r);if(r=n,i>0){if(++t>=Bt)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function F(e){return function(){return e}}var Ae=(function(){try{var e=L(Object,"defineProperty");return e({},"",{}),e}catch{}})(),Yt=Ae?function(e,t){return Ae(e,"toString",{configurable:!0,enumerable:!1,value:F(t),writable:!0})}:J,Zt=Xt(Yt);function Wt(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function Jt(e,t,r,n){for(var i=e.length,s=r+-1;++s<i;)if(t(e[s],s,e))return s;return-1}function Qt(e){return e!==e}function Vt(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}function kt(e,t,r){return t===t?Vt(e,t,r):Jt(e,Qt,r)}function er(e,t){var r=e==null?0:e.length;return!!r&&kt(e,t,0)>-1}var tr=9007199254740991,rr=/^(?:0|[1-9]\d*)$/;function Ve(e,t){var r=typeof e;return t=t??tr,!!t&&(r=="number"||r!="symbol"&&rr.test(e))&&e>-1&&e%1==0&&e<t}function ke(e,t){return e===t||e!==e&&t!==t}var Pe=Math.max;function nr(e,t,r){return t=Pe(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,s=Pe(n.length-t,0),a=Array(s);++i<s;)a[i]=n[t+i];i=-1;for(var o=Array(t+1);++i<t;)o[i]=n[i];return o[t]=r(a),zt(e,this,o)}}function ir(e,t){return Zt(nr(e,t,J),e+"")}var sr=9007199254740991;function le(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=sr}function Q(e){return e!=null&&le(e.length)&&!Z(e)}var ar=Object.prototype;function et(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ar;return e===r}function or(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var ur="[object Arguments]";function Ee(e){return j(e)&&M(e)==ur}var tt=Object.prototype,fr=tt.hasOwnProperty,hr=tt.propertyIsEnumerable,V=Ee((function(){return arguments})())?Ee:function(e){return j(e)&&fr.call(e,"callee")&&!hr.call(e,"callee")};function cr(){return!1}var rt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$e=rt&&typeof module=="object"&&module&&!module.nodeType&&module,lr=$e&&$e.exports===rt,Se=lr?w.Buffer:void 0,dr=Se?Se.isBuffer:void 0,W=dr||cr,gr="[object Arguments]",pr="[object Array]",_r="[object Boolean]",br="[object Date]",yr="[object Error]",vr="[object Function]",Or="[object Map]",mr="[object Number]",wr="[object Object]",Tr="[object RegExp]",Ar="[object Set]",Pr="[object String]",Er="[object WeakMap]",$r="[object ArrayBuffer]",Sr="[object DataView]",Cr="[object Float32Array]",jr="[object Float64Array]",xr="[object Int8Array]",Ir="[object Int16Array]",Lr="[object Int32Array]",Rr="[object Uint8Array]",Nr="[object Uint8ClampedArray]",Mr="[object Uint16Array]",Dr="[object Uint32Array]",h={};h[Cr]=h[jr]=h[xr]=h[Ir]=h[Lr]=h[Rr]=h[Nr]=h[Mr]=h[Dr]=!0;h[gr]=h[pr]=h[$r]=h[_r]=h[Sr]=h[br]=h[yr]=h[vr]=h[Or]=h[mr]=h[wr]=h[Tr]=h[Ar]=h[Pr]=h[Er]=!1;function Fr(e){return j(e)&&le(e.length)&&!!h[M(e)]}function Gr(e){return function(t){return e(t)}}var nt=typeof exports=="object"&&exports&&!exports.nodeType&&exports,U=nt&&typeof module=="object"&&module&&!module.nodeType&&module,Ur=U&&U.exports===nt,ne=Ur&&Ze.process,Ce=(function(){try{var e=U&&U.require&&U.require("util").types;return e||ne&&ne.binding&&ne.binding("util")}catch{}})(),je=Ce&&Ce.isTypedArray,de=je?Gr(je):Fr,zr=Object.prototype,Hr=zr.hasOwnProperty;function Br(e,t){var r=g(e),n=!r&&V(e),i=!r&&!n&&W(e),s=!r&&!n&&!i&&de(e),a=r||n||i||s,o=a?or(e.length,String):[],u=o.length;for(var f in e)(t||Hr.call(e,f))&&!(a&&(f=="length"||i&&(f=="offset"||f=="parent")||s&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Ve(f,u)))&&o.push(f);return o}function Kr(e,t){return function(r){return e(t(r))}}var qr=Kr(Object.keys,Object),Xr=Object.prototype,Yr=Xr.hasOwnProperty;function it(e){if(!et(e))return qr(e);var t=[];for(var r in Object(e))Yr.call(e,r)&&r!="constructor"&&t.push(r);return t}function b(e){return Q(e)?Br(e):it(e)}var Zr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wr=/^\w*$/;function ge(e,t){if(g(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||he(e)?!0:Wr.test(e)||!Zr.test(e)||t!=null&&e in Object(t)}var z=L(Object,"create");function Jr(){this.__data__=z?z(null):{},this.size=0}function Qr(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Vr="__lodash_hash_undefined__",kr=Object.prototype,en=kr.hasOwnProperty;function tn(e){var t=this.__data__;if(z){var r=t[e];return r===Vr?void 0:r}return en.call(t,e)?t[e]:void 0}var rn=Object.prototype,nn=rn.hasOwnProperty;function sn(e){var t=this.__data__;return z?t[e]!==void 0:nn.call(t,e)}var an="__lodash_hash_undefined__";function on(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=z&&t===void 0?an:t,this}function x(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}x.prototype.clear=Jr;x.prototype.delete=Qr;x.prototype.get=tn;x.prototype.has=sn;x.prototype.set=on;function un(){this.__data__=[],this.size=0}function k(e,t){for(var r=e.length;r--;)if(ke(e[r][0],t))return r;return-1}var fn=Array.prototype,hn=fn.splice;function cn(e){var t=this.__data__,r=k(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():hn.call(t,r,1),--this.size,!0}function ln(e){var t=this.__data__,r=k(t,e);return r<0?void 0:t[r][1]}function dn(e){return k(this.__data__,e)>-1}function gn(e,t){var r=this.__data__,n=k(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function T(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}T.prototype.clear=un;T.prototype.delete=cn;T.prototype.get=ln;T.prototype.has=dn;T.prototype.set=gn;var H=L(w,"Map");function pn(){this.size=0,this.__data__={hash:new x,map:new(H||T),string:new x}}function _n(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function ee(e,t){var r=e.__data__;return _n(t)?r[typeof t=="string"?"string":"hash"]:r.map}function bn(e){var t=ee(this,e).delete(e);return this.size-=t?1:0,t}function yn(e){return ee(this,e).get(e)}function vn(e){return ee(this,e).has(e)}function On(e,t){var r=ee(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function A(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}A.prototype.clear=pn;A.prototype.delete=bn;A.prototype.get=yn;A.prototype.has=vn;A.prototype.set=On;var mn="Expected a function";function pe(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(mn);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var a=e.apply(this,n);return r.cache=s.set(i,a)||s,a};return r.cache=new(pe.Cache||A),r}pe.Cache=A;var wn=500;function Tn(e){var t=pe(e,function(n){return r.size===wn&&r.clear(),n}),r=t.cache;return t}var An=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pn=/\\(\\)?/g,En=Tn(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(An,function(r,n,i,s){t.push(i?s.replace(Pn,"$1"):n||r)}),t});function $n(e){return e==null?"":Qe(e)}function st(e,t){return g(e)?e:ge(e,t)?[e]:En($n(e))}function te(e){if(typeof e=="string"||he(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function at(e,t){t=st(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[te(t[r++])];return r&&r==n?e:void 0}function Sn(e,t,r){var n=e==null?void 0:at(e,t);return n===void 0?r:n}function ot(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}var xe=y?y.isConcatSpreadable:void 0;function Cn(e){return g(e)||V(e)||!!(xe&&e&&e[xe])}function jn(e,t,r,n,i){var s=-1,a=e.length;for(r||(r=Cn),i||(i=[]);++s<a;){var o=e[s];r(o)?ot(i,o):n||(i[i.length]=o)}return i}function xn(e,t,r,n){var i=-1,s=e==null?0:e.length;for(n&&s&&(r=e[++i]);++i<s;)r=t(r,e[i],i,e);return r}function In(){this.__data__=new T,this.size=0}function Ln(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Rn(e){return this.__data__.get(e)}function Nn(e){return this.__data__.has(e)}var Mn=200;function Dn(e,t){var r=this.__data__;if(r instanceof T){var n=r.__data__;if(!H||n.length<Mn-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new A(n)}return r.set(e,t),this.size=r.size,this}function m(e){var t=this.__data__=new T(e);this.size=t.size}m.prototype.clear=In;m.prototype.delete=Ln;m.prototype.get=Rn;m.prototype.has=Nn;m.prototype.set=Dn;function ut(e,t){for(var r=-1,n=e==null?0:e.length,i=0,s=[];++r<n;){var a=e[r];t(a,r,e)&&(s[i++]=a)}return s}function Fn(){return[]}var Gn=Object.prototype,Un=Gn.propertyIsEnumerable,Ie=Object.getOwnPropertySymbols,zn=Ie?function(e){return e==null?[]:(e=Object(e),ut(Ie(e),function(t){return Un.call(e,t)}))}:Fn;function Hn(e,t,r){var n=t(e);return g(e)?n:ot(n,r(e))}function Le(e){return Hn(e,b,zn)}var ue=L(w,"DataView"),fe=L(w,"Promise"),N=L(w,"Set"),Re="[object Map]",Bn="[object Object]",Ne="[object Promise]",Me="[object Set]",De="[object WeakMap]",Fe="[object DataView]",Kn=I(ue),qn=I(H),Xn=I(fe),Yn=I(N),Zn=I(oe),O=M;(ue&&O(new ue(new ArrayBuffer(1)))!=Fe||H&&O(new H)!=Re||fe&&O(fe.resolve())!=Ne||N&&O(new N)!=Me||oe&&O(new oe)!=De)&&(O=function(e){var t=M(e),r=t==Bn?e.constructor:void 0,n=r?I(r):"";if(n)switch(n){case Kn:return Fe;case qn:return Re;case Xn:return Ne;case Yn:return Me;case Zn:return De}return t});var Ge=w.Uint8Array,Wn="__lodash_hash_undefined__";function Jn(e){return this.__data__.set(e,Wn),this}function Qn(e){return this.__data__.has(e)}function B(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new A;++t<r;)this.add(e[t])}B.prototype.add=B.prototype.push=Jn;B.prototype.has=Qn;function Vn(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function ft(e,t){return e.has(t)}var kn=1,ei=2;function ht(e,t,r,n,i,s){var a=r&kn,o=e.length,u=t.length;if(o!=u&&!(a&&u>o))return!1;var f=s.get(e),d=s.get(t);if(f&&d)return f==t&&d==e;var c=-1,l=!0,v=r&ei?new B:void 0;for(s.set(e,t),s.set(t,e);++c<o;){var p=e[c],_=t[c];if(n)var P=a?n(_,p,c,t,e,s):n(p,_,c,e,t,s);if(P!==void 0){if(P)continue;l=!1;break}if(v){if(!Vn(t,function(E,$){if(!ft(v,$)&&(p===E||i(p,E,r,n,s)))return v.push($)})){l=!1;break}}else if(!(p===_||i(p,_,r,n,s))){l=!1;break}}return s.delete(e),s.delete(t),l}function ti(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}function _e(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var ri=1,ni=2,ii="[object Boolean]",si="[object Date]",ai="[object Error]",oi="[object Map]",ui="[object Number]",fi="[object RegExp]",hi="[object Set]",ci="[object String]",li="[object Symbol]",di="[object ArrayBuffer]",gi="[object DataView]",Ue=y?y.prototype:void 0,ie=Ue?Ue.valueOf:void 0;function pi(e,t,r,n,i,s,a){switch(r){case gi:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case di:return!(e.byteLength!=t.byteLength||!s(new Ge(e),new Ge(t)));case ii:case si:case ui:return ke(+e,+t);case ai:return e.name==t.name&&e.message==t.message;case fi:case ci:return e==t+"";case oi:var o=ti;case hi:var u=n&ri;if(o||(o=_e),e.size!=t.size&&!u)return!1;var f=a.get(e);if(f)return f==t;n|=ni,a.set(e,t);var d=ht(o(e),o(t),n,i,s,a);return a.delete(e),d;case li:if(ie)return ie.call(e)==ie.call(t)}return!1}var _i=1,bi=Object.prototype,yi=bi.hasOwnProperty;function vi(e,t,r,n,i,s){var a=r&_i,o=Le(e),u=o.length,f=Le(t),d=f.length;if(u!=d&&!a)return!1;for(var c=u;c--;){var l=o[c];if(!(a?l in t:yi.call(t,l)))return!1}var v=s.get(e),p=s.get(t);if(v&&p)return v==t&&p==e;var _=!0;s.set(e,t),s.set(t,e);for(var P=a;++c<u;){l=o[c];var E=e[l],$=t[l];if(n)var ve=a?n($,E,l,t,e,s):n(E,$,l,e,t,s);if(!(ve===void 0?E===$||i(E,$,r,n,s):ve)){_=!1;break}P||(P=l=="constructor")}if(_&&!P){var K=e.constructor,q=t.constructor;K!=q&&"constructor"in e&&"constructor"in t&&!(typeof K=="function"&&K instanceof K&&typeof q=="function"&&q instanceof q)&&(_=!1)}return s.delete(e),s.delete(t),_}var Oi=1,ze="[object Arguments]",He="[object Array]",X="[object Object]",mi=Object.prototype,Be=mi.hasOwnProperty;function wi(e,t,r,n,i,s){var a=g(e),o=g(t),u=a?He:O(e),f=o?He:O(t);u=u==ze?X:u,f=f==ze?X:f;var d=u==X,c=f==X,l=u==f;if(l&&W(e)){if(!W(t))return!1;a=!0,d=!1}if(l&&!d)return s||(s=new m),a||de(e)?ht(e,t,r,n,i,s):pi(e,t,u,r,n,i,s);if(!(r&Oi)){var v=d&&Be.call(e,"__wrapped__"),p=c&&Be.call(t,"__wrapped__");if(v||p){var _=v?e.value():e,P=p?t.value():t;return s||(s=new m),i(_,P,r,n,s)}}return l?(s||(s=new m),vi(e,t,r,n,i,s)):!1}function be(e,t,r,n,i){return e===t?!0:e==null||t==null||!j(e)&&!j(t)?e!==e&&t!==t:wi(e,t,r,n,be,i)}var Ti=1,Ai=2;function Pi(e,t,r,n){var i=r.length,s=i;if(e==null)return!s;for(e=Object(e);i--;){var a=r[i];if(a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<s;){a=r[i];var o=a[0],u=e[o],f=a[1];if(a[2]){if(u===void 0&&!(o in e))return!1}else{var d=new m,c;if(!(c===void 0?be(f,u,Ti|Ai,n,d):c))return!1}}return!0}function ct(e){return e===e&&!ce(e)}function Ei(e){for(var t=b(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,ct(i)]}return t}function lt(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function $i(e){var t=Ei(e);return t.length==1&&t[0][2]?lt(t[0][0],t[0][1]):function(r){return r===e||Pi(r,e,t)}}function Si(e,t){return e!=null&&t in Object(e)}function Ci(e,t,r){t=st(t,e);for(var n=-1,i=t.length,s=!1;++n<i;){var a=te(t[n]);if(!(s=e!=null&&r(e,a)))break;e=e[a]}return s||++n!=i?s:(i=e==null?0:e.length,!!i&&le(i)&&Ve(a,i)&&(g(e)||V(e)))}function ji(e,t){return e!=null&&Ci(e,t,Si)}var xi=1,Ii=2;function Li(e,t){return ge(e)&&ct(t)?lt(te(e),t):function(r){var n=Sn(r,e);return n===void 0&&n===t?ji(r,e):be(t,n,xi|Ii)}}function Ri(e){return function(t){return t==null?void 0:t[e]}}function Ni(e){return function(t){return at(t,e)}}function Mi(e){return ge(e)?Ri(te(e)):Ni(e)}function dt(e){return typeof e=="function"?e:e==null?J:typeof e=="object"?g(e)?Li(e[0],e[1]):$i(e):Mi(e)}function Di(e){return function(t,r,n){for(var i=-1,s=Object(t),a=n(t),o=a.length;o--;){var u=a[++i];if(r(s[u],u,s)===!1)break}return t}}var Fi=Di();function Gi(e,t){return e&&Fi(e,t,b)}function Ui(e,t){return function(r,n){if(r==null)return r;if(!Q(r))return e(r,n);for(var i=r.length,s=-1,a=Object(r);++s<i&&n(a[s],s,a)!==!1;);return r}}var ye=Ui(Gi);function zi(e){return j(e)&&Q(e)}function Hi(e){return typeof e=="function"?e:J}function S(e,t){var r=g(e)?Wt:ye;return r(e,Hi(t))}function Bi(e,t){var r=[];return ye(e,function(n,i,s){t(n,i,s)&&r.push(n)}),r}function Y(e,t){var r=g(e)?ut:Bi;return r(e,dt(t))}function Ki(e,t){return Je(t,function(r){return e[r]})}function se(e){return e==null?[]:Ki(e,b(e))}var qi="[object Map]",Xi="[object Set]",Yi=Object.prototype,Zi=Yi.hasOwnProperty;function Ke(e){if(e==null)return!0;if(Q(e)&&(g(e)||typeof e=="string"||typeof e.splice=="function"||W(e)||de(e)||V(e)))return!e.length;var t=O(e);if(t==qi||t==Xi)return!e.size;if(et(e))return!it(e).length;for(var r in e)if(Zi.call(e,r))return!1;return!0}function R(e){return e===void 0}function Wi(e,t,r,n,i){return i(e,function(s,a,o){r=n?(n=!1,s):t(r,s,a,o)}),r}function Ji(e,t,r){var n=g(e)?xn:Wi,i=arguments.length<3;return n(e,dt(t),r,i,ye)}var Qi=1/0,Vi=N&&1/_e(new N([,-0]))[1]==Qi?function(e){return new N(e)}:Ht,ki=200;function es(e,t,r){var n=-1,i=er,s=e.length,a=!0,o=[],u=o;if(s>=ki){var f=Vi(e);if(f)return _e(f);a=!1,i=ft,u=new B}else u=o;e:for(;++n<s;){var d=e[n],c=d;if(d=d!==0?d:0,a&&c===c){for(var l=u.length;l--;)if(u[l]===c)continue e;o.push(d)}else i(u,c,r)||(u!==o&&u.push(c),o.push(d))}return o}var ts=ir(function(e){return es(jn(e,1,zi,!0))}),rs="\0",C="\0",qe="";class gt{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=F(void 0),this._defaultEdgeLabelFn=F(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[C]={}),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(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return Z(t)||(t=F(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return b(this._nodes)}sources(){var t=this;return Y(this.nodes(),function(r){return Ke(t._in[r])})}sinks(){var t=this;return Y(this.nodes(),function(r){return Ke(t._out[r])})}setNodes(t,r){var n=arguments,i=this;return S(t,function(s){n.length>1?i.setNode(s,r):i.setNode(s)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=C,this._children[t]={},this._children[C][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],S(this.children(t),n=>{this.setParent(n)}),delete this._children[t]),S(b(this._in[t]),r),delete this._in[t],delete this._preds[t],S(b(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(R(r))r=C;else{r+="";for(var n=r;!R(n);n=this.parent(n))if(n===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==C)return r}}children(t){if(R(t)&&(t=C),this._isCompound){var r=this._children[t];if(r)return b(r)}else{if(t===C)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return b(r)}successors(t){var r=this._sucs[t];if(r)return b(r)}neighbors(t){var r=this.predecessors(t);if(r)return ts(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var n=this;S(this._nodes,function(a,o){t(o)&&r.setNode(o,a)}),S(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,n.edge(a))});var i={};function s(a){var o=n.parent(a);return o===void 0||r.hasNode(o)?(i[a]=o,o):o in i?i[o]:s(o)}return this._isCompound&&S(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(t){return Z(t)||(t=F(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return se(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return Ji(t,function(s,a){return i.length>1?n.setEdge(s,a,r):n.setEdge(s,a),a}),this}setEdge(){var t,r,n,i,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,n=a.name,arguments.length===2&&(i=arguments[1],s=!0)):(t=a,r=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],s=!0)),t=""+t,r=""+r,R(n)||(n=""+n);var o=G(this._isDirected,t,r,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return s&&(this._edgeLabels[o]=i),this;if(!R(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[o]=s?i:this._defaultEdgeLabelFn(t,r,n);var u=ns(this._isDirected,t,r,n);return t=u.v,r=u.w,Object.freeze(u),this._edgeObjs[o]=u,Xe(this._preds[r],t),Xe(this._sucs[t],r),this._in[r][o]=u,this._out[t][o]=u,this._edgeCount++,this}edge(t,r,n){var i=arguments.length===1?ae(this._isDirected,arguments[0]):G(this._isDirected,t,r,n);return this._edgeLabels[i]}hasEdge(t,r,n){var i=arguments.length===1?ae(this._isDirected,arguments[0]):G(this._isDirected,t,r,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(t,r,n){var i=arguments.length===1?ae(this._isDirected,arguments[0]):G(this._isDirected,t,r,n),s=this._edgeObjs[i];return s&&(t=s.v,r=s.w,delete this._edgeLabels[i],delete this._edgeObjs[i],Ye(this._preds[r],t),Ye(this._sucs[t],r),delete this._in[r][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,r){var n=this._in[t];if(n){var i=se(n);return r?Y(i,function(s){return s.v===r}):i}}outEdges(t,r){var n=this._out[t];if(n){var i=se(n);return r?Y(i,function(s){return s.w===r}):i}}nodeEdges(t,r){var n=this.inEdges(t,r);if(n)return n.concat(this.outEdges(t,r))}}gt.prototype._nodeCount=0;gt.prototype._edgeCount=0;function Xe(e,t){e[t]?e[t]++:e[t]=1}function Ye(e,t){--e[t]||delete e[t]}function G(e,t,r,n){var i=""+t,s=""+r;if(!e&&i>s){var a=i;i=s,s=a}return i+qe+s+qe+(R(n)?rs:n)}function ns(e,t,r,n){var i=""+t,s=""+r;if(!e&&i>s){var a=i;i=s,s=a}var o={v:i,w:s};return n&&(o.name=n),o}function ae(e,t){return G(e,t.v,t.w,t.name)}export{Y as $,he as A,Ve as B,ir as C,jn as D,Zt as E,nr as F,gt as G,M as H,de as I,zi as J,V as K,Z as L,Fi as M,Jt as N,Hi as O,Gi as P,Ci as Q,J as R,y as S,st as T,Ge as U,te as V,at as W,ji as X,$n as Y,S as Z,F as _,ce as a,se as a0,Ji as a1,et as b,Q as c,Ae as d,ke as e,Br as f,zn as g,ot as h,R as i,Hn as j,b as k,j as l,O as m,Gr as n,Kr as o,Ce as p,W as q,w as r,Fn as s,m as t,Wt as u,g as v,Le as w,ye as x,dt as y,Je as z};