@codingame/monaco-vscode-markdown-language-features-default-extension 36.2.7 → 37.1.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.
- package/index.js +237 -23
- package/package.json +2 -2
- package/resources/abnfDiagram-VCTEODGH-MFZBS7QV.js +1 -0
- package/resources/architecture-7GRP2DOG-KMESPJ5A.js +1 -0
- package/resources/architectureDiagram-5GKGNRK7-MTTZPDNG.js +36 -0
- package/resources/blockDiagram-NRAW4CY4-UDRMVB5I.js +129 -0
- package/resources/c4Diagram-UCG6FXSJ-CNUYFC6N.js +38 -0
- package/resources/chunk-2KBWIZHB.js +14 -0
- package/resources/chunk-3CEAP2V5.js +1 -0
- package/resources/chunk-43RBMH4Y.js +1 -0
- package/resources/chunk-4AUIAGYT.js +1 -0
- package/resources/chunk-4PRM3W7S.js +88 -0
- package/resources/chunk-5DJUZA4F.js +1 -0
- package/resources/chunk-6LQNQPBM.js +1 -0
- package/resources/chunk-A3DHMJKP.js +1 -0
- package/resources/chunk-ATDVZUJ2.js +231 -0
- package/resources/chunk-CBQW2LLN.js +1 -0
- package/resources/chunk-CCQNES6G.js +1 -0
- package/resources/chunk-CD5RYVNW.js +1 -0
- package/resources/chunk-CQFFNO72.js +1 -0
- package/resources/chunk-EWILYK3H.js +1 -0
- package/resources/chunk-EWVD6AUZ.js +15 -0
- package/resources/chunk-EXFMYL6U.js +1 -0
- package/resources/chunk-FH3BATM5.js +1 -0
- package/resources/chunk-FK4OKHO7.js +178 -0
- package/resources/chunk-FZLE27CN.js +1 -0
- package/resources/chunk-HRJ5UBVC.js +1 -0
- package/resources/chunk-IEMKBRIG.js +339 -0
- package/resources/chunk-IRNO36C3.js +1 -0
- package/resources/chunk-J4SQIVOP.js +1 -0
- package/resources/chunk-JAORNH2M.js +2 -0
- package/resources/chunk-JBQZ5UCE.js +1 -0
- package/resources/chunk-JFI5BOLY.js +1 -0
- package/resources/chunk-JXCTOEX6.js +1 -0
- package/resources/chunk-K2JFJOPP.js +1 -0
- package/resources/chunk-LK6KML2S.js +10 -0
- package/resources/chunk-MNHOAW4R.js +3 -0
- package/resources/chunk-NLCJ5AKJ.js +132 -0
- package/resources/chunk-OOJM4CTU.js +1 -0
- package/resources/chunk-R7CM4BQN.js +2 -0
- package/resources/chunk-RBL2QVA3.js +1 -0
- package/resources/chunk-SNGMH3JW.js +2 -0
- package/resources/chunk-TGD3YKTU.js +32 -0
- package/resources/chunk-TGYBLZFN.js +1 -0
- package/resources/chunk-U3E5RSXE.js +62 -0
- package/resources/chunk-U7TCJVVP.js +1 -0
- package/resources/chunk-WSHCWW4Q.js +2 -0
- package/resources/chunk-WVYKIHVG.js +1 -0
- package/resources/chunk-XCMS6RVA.js +1 -0
- package/resources/chunk-XM54GAH3.js +206 -0
- package/resources/chunk-YICKNY6Y.js +1 -0
- package/resources/chunk-YNKYB66X.js +257 -0
- package/resources/chunk-ZMBQGVIF.js +1 -0
- package/resources/chunk-ZNREFWKG.js +1 -0
- package/resources/chunk-ZU7JKVUR.js +168 -0
- package/resources/chunk-ZYRITDEB.js +72 -0
- package/resources/classDiagram-DTDB5LWJ-TBJLBGTZ.js +1 -0
- package/resources/codicon-R6HEZFPR.ttf +0 -0
- package/resources/cose-bilkent-JH36ORCC-7TCRTQWC.js +1 -0
- package/resources/cynefin-OW5HDTMX-QMEUXFXO.js +1 -0
- package/resources/cynefinDiagram-5FMLGOSQ-J745EYTI.js +62 -0
- package/resources/dagre-3AP2YEHR-CUFPL4A5.js +4 -0
- package/resources/diagram-S7CK7UJ4-SC5AFKXH.js +30 -0
- package/resources/diagram-UQ7AKVKN-3O7WQJXE.js +41 -0
- package/resources/diagram-VSXAHHWV-SN3VCCS5.js +3 -0
- package/resources/diagram-VX7I27RA-7PQJWMN5.js +24 -0
- package/resources/diagram-Z3DM3KII-QZ45TJFK.js +24 -0
- package/resources/ebnfDiagram-PWID7BFC-CBJPGG56.js +1 -0
- package/resources/editor.css.txt +1 -1
- package/resources/editor.js +137 -3431
- package/resources/editor.ts +587 -46
- package/resources/erDiagram-SSCWMZ5O-TUKYG42P.js +99 -0
- package/resources/eventmodeling-NTZA5JFV-MGOPW7BD.js +1 -0
- package/resources/extension.js +179 -172
- package/resources/extension.js.map +4 -4
- package/resources/flowDiagram-A5DVABFB-M6K5X26V.js +1 -0
- package/resources/ganttDiagram-EL5Y4UJY-JCSKUU2V.js +292 -0
- package/resources/gitGraph-4MIJSDKK-ITDCTFJT.js +1 -0
- package/resources/gitGraphDiagram-WWUBYQGX-RXRB5JA2.js +106 -0
- package/resources/index.js +3 -3
- package/resources/index2.js +17 -17
- package/resources/info-A6RAGUB7-VXIEHQAI.js +1 -0
- package/resources/infoDiagram-RXCK75RN-2T6V4JS2.js +2 -0
- package/resources/ishikawaDiagram-5VMMS53U-6WC4IGXZ.js +70 -0
- package/resources/journeyDiagram-EYS64GPL-PZQYT6UF.js +139 -0
- package/resources/kanban-definition-3QL26DDD-VYBV345J.js +89 -0
- package/resources/katex-QJ7O5CJ5.js +1 -0
- package/resources/linkPresentationProvider.ts +179 -0
- package/resources/markdown.css.txt +39 -0
- package/resources/markdownEditor.css.txt +13 -0
- package/resources/mermaid.core-S5KCHHL2.js +18 -0
- package/resources/mindmap-definition-FBJOCRG2-H3I5F4WB.js +96 -0
- package/resources/package.json +1 -1
- package/resources/package.nls.json +1 -1
- package/resources/package.schema.json +1 -1
- package/resources/packet-AYTQ26CC-WLFKOXIZ.js +1 -0
- package/resources/pegDiagram-XKGWAZYB-HUV4U5RU.js +1 -0
- package/resources/pie-WAS4IAKB-GZIMD664.js +1 -0
- package/resources/pieDiagram-E7YTZNPT-XOJEVCEO.js +39 -0
- package/resources/pre.js +1 -1
- package/resources/preview-dark.svg +1 -1
- package/resources/preview-light.svg +1 -1
- package/resources/quadrantDiagram-AXDQQJYC-YPPZYAGP.js +7 -0
- package/resources/radar-RG4KPBEZ-URG5LVGS.js +1 -0
- package/resources/railroad-74A4TZTK-3ZMXCKLP.js +1 -0
- package/resources/railroad-abnf-HS5TGJTU-LBR5MV33.js +1 -0
- package/resources/railroad-ebnf-LZEXJU2U-YEVF3EJR.js +1 -0
- package/resources/railroad-peg-WCYAUIDC-CV774YSK.js +1 -0
- package/resources/railroadDiagram-O6MQD6OU-YZF7JNDT.js +1 -0
- package/resources/requirementDiagram-EFPCY7ZU-PZ7BYTDZ.js +84 -0
- package/resources/sankeyDiagram-P5KCCOFB-3P5DWREA.js +40 -0
- package/resources/sequenceDiagram-WJ2MYXX4-O52K5NPU.js +162 -0
- package/resources/sizeCapture-X5ZJPWSS-PRFE7SKK.js +1 -0
- package/resources/stateDiagram-HBIQ2CUA-KDPYCQOT.js +1 -0
- package/resources/stateDiagram-v2-4QOOHH4V-QBQE56JB.js +1 -0
- package/resources/swimlanes-XN3QIQJK-YCLJ3KIH.js +1 -0
- package/resources/swimlanesDiagram-VK2B7HYN-RS7VRH6T.js +8 -0
- package/resources/syntaxHighlighter.ts +2 -2
- package/resources/timeline-definition-24CTP7MA-GQ3MCHCF.js +120 -0
- package/resources/treeView-Q6P3EWNA-UEXUSAGC.js +1 -0
- package/resources/treemap-WGGIJYW6-NFXJPDAT.js +1 -0
- package/resources/tsconfig.json +1 -1
- package/resources/vennDiagram-4TSXK5OY-PNMXQJF6.js +34 -0
- package/resources/wardley-WFR3VGLG-MQ6DEZYA.js +1 -0
- package/resources/wardleyDiagram-VM6X3IG4-46KJTB57.js +78 -0
- package/resources/xychartDiagram-S5SC5T6Z-NSN5W7VL.js +7 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as r,c as m}from"./chunk-ZU7JKVUR.js";import"./chunk-TGD3YKTU.js";import"./chunk-EWVD6AUZ.js";import"./chunk-FH3BATM5.js";import"./chunk-CQFFNO72.js";import"./chunk-TGYBLZFN.js";import"./chunk-RBL2QVA3.js";import"./chunk-LK6KML2S.js";import"./chunk-CBQW2LLN.js";import"./chunk-U7TCJVVP.js";import"./chunk-U3E5RSXE.js";import"./chunk-EWILYK3H.js";import"./chunk-XCMS6RVA.js";import"./chunk-ZYRITDEB.js";import"./chunk-4AUIAGYT.js";import"./chunk-JAORNH2M.js";import"./chunk-JBQZ5UCE.js";import"./chunk-NLCJ5AKJ.js";import"./chunk-3CEAP2V5.js";import"./chunk-6LQNQPBM.js";import"./chunk-OOJM4CTU.js";export{r as createFlowDiagram,m as diagram};
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import{p as Ye}from"./chunk-JAORNH2M.js";import{a as Je}from"./chunk-JBQZ5UCE.js";import{N as ce,O as le,T as ue,U as de,V as fe,W as he,X as me,Y as ke,Z as ye,_ as ot}from"./chunk-NLCJ5AKJ.js";import{A as Ee,B as Ft,C as Ot,D as Ie,a as oe,b as rt,d as ge,e as pe,f as ve,g as Te,h as vt,i as be,o as xe,p as It,q as Yt,r as $t,s as Lt,t as At,u as we,v as _e,w as De,x as Se,y as Ce,z as Me}from"./chunk-3CEAP2V5.js";import{a as l}from"./chunk-6LQNQPBM.js";import{a as wt,c as at}from"./chunk-OOJM4CTU.js";var $e=wt((Wt,Vt)=>{(function(t,e){typeof Wt=="object"&&typeof Vt<"u"?Vt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_isoWeek=e()})(Wt,(function(){"use strict";var t="day";return function(e,n,s){var r=function(w){return w.add(4-w.isoWeekday(),t)},f=n.prototype;f.isoWeekYear=function(){return r(this).year()},f.isoWeek=function(w){if(!this.$utils().u(w))return this.add(7*(w-this.isoWeek()),t);var S,N,Y,z,R=r(this),H=(S=this.isoWeekYear(),N=this.$u,Y=(N?s.utc:s)().year(S).startOf("year"),z=4-Y.isoWeekday(),Y.isoWeekday()>4&&(z+=7),Y.add(z,t));return R.diff(H,"week")+1},f.isoWeekday=function(w){return this.$utils().u(w)?this.day()||7:this.day(this.day()%7?w:w-7)};var y=f.startOf;f.startOf=function(w,S){var N=this.$utils(),Y=!!N.u(S)||S;return N.p(w)==="isoweek"?Y?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):y.bind(this)(w,S)}}}))});var Le=wt((Pt,Nt)=>{(function(t,e){typeof Pt=="object"&&typeof Nt<"u"?Nt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_customParseFormat=e()})(Pt,(function(){"use strict";var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},e=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,s=/\d\d/,r=/\d\d?/,f=/\d*[^-_:/,()\s\d]+/,y={},w=function(x){return(x=+x)+(x>68?1900:2e3)},S=function(x){return function(_){this[x]=+_}},N=[/[+-]\d\d:?(\d\d)?|Z/,function(x){(this.zone||(this.zone={})).offset=(function(_){if(!_||_==="Z")return 0;var b=_.match(/([+-]|\d\d)/g),A=60*b[1]+(+b[2]||0);return A===0?0:b[0]==="+"?-A:A})(x)}],Y=function(x){var _=y[x];return _&&(_.indexOf?_:_.s.concat(_.f))},z=function(x,_){var b,A=y.meridiem;if(A){for(var X=1;X<=24;X+=1)if(x.indexOf(A(X,0,_))>-1){b=X>12;break}}else b=x===(_?"pm":"PM");return b},R={A:[f,function(x){this.afternoon=z(x,!1)}],a:[f,function(x){this.afternoon=z(x,!0)}],Q:[n,function(x){this.month=3*(x-1)+1}],S:[n,function(x){this.milliseconds=100*+x}],SS:[s,function(x){this.milliseconds=10*+x}],SSS:[/\d{3}/,function(x){this.milliseconds=+x}],s:[r,S("seconds")],ss:[r,S("seconds")],m:[r,S("minutes")],mm:[r,S("minutes")],H:[r,S("hours")],h:[r,S("hours")],HH:[r,S("hours")],hh:[r,S("hours")],D:[r,S("day")],DD:[s,S("day")],Do:[f,function(x){var _=y.ordinal,b=x.match(/\d+/);if(this.day=b[0],_)for(var A=1;A<=31;A+=1)_(A).replace(/\[|\]/g,"")===x&&(this.day=A)}],w:[r,S("week")],ww:[s,S("week")],M:[r,S("month")],MM:[s,S("month")],MMM:[f,function(x){var _=Y("months"),b=(Y("monthsShort")||_.map((function(A){return A.slice(0,3)}))).indexOf(x)+1;if(b<1)throw new Error;this.month=b%12||b}],MMMM:[f,function(x){var _=Y("months").indexOf(x)+1;if(_<1)throw new Error;this.month=_%12||_}],Y:[/[+-]?\d+/,S("year")],YY:[s,function(x){this.year=w(x)}],YYYY:[/\d{4}/,S("year")],Z:N,ZZ:N};function H(x){var _,b;_=x,b=y&&y.formats;for(var A=(x=_.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(W,F,k){var p=k&&k.toUpperCase();return F||b[k]||t[k]||b[p].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(v,T,a){return T||a.slice(1)}))}))).match(e),X=A.length,U=0;U<X;U+=1){var $=A[U],g=R[$],m=g&&g[0],I=g&&g[1];A[U]=I?{regex:m,parser:I}:$.replace(/^\[|\]$/g,"")}return function(W){for(var F={},k=0,p=0;k<X;k+=1){var v=A[k];if(typeof v=="string")p+=v.length;else{var T=v.regex,a=v.parser,h=W.slice(p),d=T.exec(h)[0];a.call(F,d),W=W.replace(d,"")}}return(function(u){var C=u.afternoon;if(C!==void 0){var i=u.hours;C?i<12&&(u.hours+=12):i===12&&(u.hours=0),delete u.afternoon}})(F),F}}return function(x,_,b){b.p.customParseFormat=!0,x&&x.parseTwoDigitYear&&(w=x.parseTwoDigitYear);var A=_.prototype,X=A.parse;A.parse=function(U){var $=U.date,g=U.utc,m=U.args;this.$u=g;var I=m[1];if(typeof I=="string"){var W=m[2]===!0,F=m[3]===!0,k=W||F,p=m[2];F&&(p=m[2]),y=this.$locale(),!W&&p&&(y=b.Ls[p]),this.$d=(function(h,d,u,C){try{if(["x","X"].indexOf(d)>-1)return new Date((d==="X"?1e3:1)*h);var i=H(d)(h),M=i.year,c=i.month,B=i.day,o=i.hours,D=i.minutes,E=i.seconds,V=i.milliseconds,P=i.zone,L=i.week,O=new Date,tt=B||(M||c?1:O.getDate()),et=M||O.getFullYear(),lt=0;M&&!c||(lt=c>0?c-1:O.getMonth());var ut,dt=o||0,j=D||0,nt=E||0,K=V||0;return P?new Date(Date.UTC(et,lt,tt,dt,j,nt,K+60*P.offset*1e3)):u?new Date(Date.UTC(et,lt,tt,dt,j,nt,K)):(ut=new Date(et,lt,tt,dt,j,nt,K),L&&(ut=C(ut).week(L).toDate()),ut)}catch{return new Date("")}})($,I,g,b),this.init(),p&&p!==!0&&(this.$L=this.locale(p).$L),k&&$!=this.format(I)&&(this.$d=new Date("")),y={}}else if(I instanceof Array)for(var v=I.length,T=1;T<=v;T+=1){m[1]=I[T-1];var a=b.apply(this,m);if(a.isValid()){this.$d=a.$d,this.$L=a.$L,this.init();break}T===v&&(this.$d=new Date(""))}else X.call(this,U)}}}))});var Ae=wt((Rt,zt)=>{(function(t,e){typeof Rt=="object"&&typeof zt<"u"?zt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=e()})(Rt,(function(){"use strict";return function(t,e){var n=e.prototype,s=n.format;n.format=function(r){var f=this,y=this.$locale();if(!this.isValid())return s.bind(this)(r);var w=this.$utils(),S=(r||"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(N){switch(N){case"Q":return Math.ceil((f.$M+1)/3);case"Do":return y.ordinal(f.$D);case"gggg":return f.weekYear();case"GGGG":return f.isoWeekYear();case"wo":return y.ordinal(f.week(),"W");case"w":case"ww":return w.s(f.week(),N==="w"?1:2,"0");case"W":case"WW":return w.s(f.isoWeek(),N==="W"?1:2,"0");case"k":case"kk":return w.s(String(f.$H===0?24:f.$H),N==="k"?1:2,"0");case"X":return Math.floor(f.$d.getTime()/1e3);case"x":return f.$d.getTime();case"z":return"["+f.offsetName()+"]";case"zzz":return"["+f.offsetName("long")+"]";default:return N}}));return s.bind(this)(S)}}}))});var Fe=wt((Ht,Bt)=>{(function(t,e){typeof Ht=="object"&&typeof Bt<"u"?Bt.exports=e():typeof define=="function"&&define.amd?define(e):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_duration=e()})(Ht,(function(){"use strict";var t,e,n=1e3,s=6e4,r=36e5,f=864e5,y=31536e6,w=2628e6,S=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,N=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,Y={years:y,months:w,days:f,hours:r,minutes:s,seconds:n,milliseconds:1,weeks:6048e5},z=function($){return $ instanceof X},R=function($,g,m){return new X($,m,g.$l)},H=function($){return e.p($)+"s"},x=function($){return $<0},_=function($){return x($)?Math.ceil($):Math.floor($)},b=function($){return Math.abs($)},A=function($,g){return $?x($)?{negative:!0,format:""+b($)+g}:{negative:!1,format:""+$+g}:{negative:!1,format:""}},X=(function(){function $(m,I,W){var F=this;if(this.$d={},this.$l=W,m===void 0&&(this.$ms=0,this.parseFromMilliseconds()),I)return R(m*Y[H(I)],this);if(typeof m=="number")return this.$ms=m,this.parseFromMilliseconds(),this;if(typeof m=="object")return Object.keys(m).forEach((function(v){F.$d[H(v)]=m[v]})),this.calMilliseconds(),this;if(typeof m=="string"){var k=m.match(S);if(k){var p=k.slice(2).map((function(v){return v!=null?Number(v):0}));return this.$d.years=p[0],this.$d.months=p[1],this.$d.weeks=p[2],this.$d.days=p[3],this.$d.hours=p[4],this.$d.minutes=p[5],this.$d.seconds=p[6],this.calMilliseconds(),this}}return this}var g=$.prototype;return g.calMilliseconds=function(){var m=this;this.$ms=Object.keys(this.$d).reduce((function(I,W){return I+(m.$d[W]||0)*Y[W]}),0)},g.parseFromMilliseconds=function(){var m=this.$ms;this.$d.years=_(m/y),m%=y,this.$d.months=_(m/w),m%=w,this.$d.days=_(m/f),m%=f,this.$d.hours=_(m/r),m%=r,this.$d.minutes=_(m/s),m%=s,this.$d.seconds=_(m/n),m%=n,this.$d.milliseconds=m},g.toISOString=function(){var m=A(this.$d.years,"Y"),I=A(this.$d.months,"M"),W=+this.$d.days||0;this.$d.weeks&&(W+=7*this.$d.weeks);var F=A(W,"D"),k=A(this.$d.hours,"H"),p=A(this.$d.minutes,"M"),v=this.$d.seconds||0;this.$d.milliseconds&&(v+=this.$d.milliseconds/1e3,v=Math.round(1e3*v)/1e3);var T=A(v,"S"),a=m.negative||I.negative||F.negative||k.negative||p.negative||T.negative,h=k.format||p.format||T.format?"T":"",d=(a?"-":"")+"P"+m.format+I.format+F.format+h+k.format+p.format+T.format;return d==="P"||d==="-P"?"P0D":d},g.toJSON=function(){return this.toISOString()},g.format=function(m){var I=m||"YYYY-MM-DDTHH:mm:ss",W={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(N,(function(F,k){return k||String(W[F])}))},g.as=function(m){return this.$ms/Y[H(m)]},g.get=function(m){var I=this.$ms,W=H(m);return W==="milliseconds"?I%=1e3:I=W==="weeks"?_(I/Y[W]):this.$d[W],I||0},g.add=function(m,I,W){var F;return F=I?m*Y[H(I)]:z(m)?m.$ms:R(m,this).$ms,R(this.$ms+F*(W?-1:1),this)},g.subtract=function(m,I){return this.add(m,I,!0)},g.locale=function(m){var I=this.clone();return I.$l=m,I},g.clone=function(){return R(this.$ms,this)},g.humanize=function(m){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!m)},g.valueOf=function(){return this.asMilliseconds()},g.milliseconds=function(){return this.get("milliseconds")},g.asMilliseconds=function(){return this.as("milliseconds")},g.seconds=function(){return this.get("seconds")},g.asSeconds=function(){return this.as("seconds")},g.minutes=function(){return this.get("minutes")},g.asMinutes=function(){return this.as("minutes")},g.hours=function(){return this.get("hours")},g.asHours=function(){return this.as("hours")},g.days=function(){return this.get("days")},g.asDays=function(){return this.as("days")},g.weeks=function(){return this.get("weeks")},g.asWeeks=function(){return this.as("weeks")},g.months=function(){return this.get("months")},g.asMonths=function(){return this.as("months")},g.years=function(){return this.get("years")},g.asYears=function(){return this.as("years")},$})(),U=function($,g,m){return $.add(g.years()*m,"y").add(g.months()*m,"M").add(g.days()*m,"d").add(g.hours()*m,"h").add(g.minutes()*m,"m").add(g.seconds()*m,"s").add(g.milliseconds()*m,"ms")};return function($,g,m){t=m,e=m().$utils(),m.duration=function(F,k){var p=m.locale();return R(F,{$l:p},k)},m.isDuration=z;var I=g.prototype.add,W=g.prototype.subtract;g.prototype.add=function(F,k){return z(F)?U(this,F,1):I.bind(this)(F,k)},g.prototype.subtract=function(F,k){return z(F)?U(this,F,-1):W.bind(this)(F,k)}}}))});var Pe=at(Je(),1),Q=at(oe(),1),Ne=at($e(),1),Re=at(Le(),1),ze=at(Ae(),1),mt=at(oe(),1),Ke=at(Fe(),1);var Gt=(function(){var t=l(function(T,a,h,d){for(h=h||{},d=T.length;d--;h[T[d]]=a);return h},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],s=[1,27],r=[1,28],f=[1,29],y=[1,30],w=[1,31],S=[1,32],N=[1,33],Y=[1,34],z=[1,9],R=[1,10],H=[1,11],x=[1,12],_=[1,13],b=[1,14],A=[1,15],X=[1,16],U=[1,19],$=[1,20],g=[1,21],m=[1,22],I=[1,23],W=[1,25],F=[1,35],k={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(a,h,d,u,C,i,M){var c=i.length-1;switch(C){case 1:return i[c-1];case 2:this.$=[];break;case 3:i[c-1].push(i[c]),this.$=i[c-1];break;case 4:case 5:this.$=i[c];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(i[c].substr(11)),this.$=i[c].substr(11);break;case 18:u.enableInclusiveEndDates(),this.$=i[c].substr(18);break;case 19:u.TopAxis(),this.$=i[c].substr(8);break;case 20:u.setAxisFormat(i[c].substr(11)),this.$=i[c].substr(11);break;case 21:u.setTickInterval(i[c].substr(13)),this.$=i[c].substr(13);break;case 22:u.setExcludes(i[c].substr(9)),this.$=i[c].substr(9);break;case 23:u.setIncludes(i[c].substr(9)),this.$=i[c].substr(9);break;case 24:u.setTodayMarker(i[c].substr(12)),this.$=i[c].substr(12);break;case 27:u.setDiagramTitle(i[c].substr(6)),this.$=i[c].substr(6);break;case 28:this.$=i[c].trim(),u.setAccTitle(this.$);break;case 29:case 30:this.$=i[c].trim(),u.setAccDescription(this.$);break;case 31:u.addSection(i[c].substr(8)),this.$=i[c].substr(8);break;case 33:u.addTask(i[c-1],i[c]),this.$="task";break;case 34:this.$=i[c-1],u.setClickEvent(i[c-1],i[c],null);break;case 35:this.$=i[c-2],u.setClickEvent(i[c-2],i[c-1],i[c]);break;case 36:this.$=i[c-2],u.setClickEvent(i[c-2],i[c-1],null),u.setLink(i[c-2],i[c]);break;case 37:this.$=i[c-3],u.setClickEvent(i[c-3],i[c-2],i[c-1]),u.setLink(i[c-3],i[c]);break;case 38:this.$=i[c-2],u.setClickEvent(i[c-2],i[c],null),u.setLink(i[c-2],i[c-1]);break;case 39:this.$=i[c-3],u.setClickEvent(i[c-3],i[c-1],i[c]),u.setLink(i[c-3],i[c-2]);break;case 40:this.$=i[c-1],u.setLink(i[c-1],i[c]);break;case 41:case 47:this.$=i[c-1]+" "+i[c];break;case 42:case 43:case 45:this.$=i[c-2]+" "+i[c-1]+" "+i[c];break;case 44:case 46:this.$=i[c-3]+" "+i[c-2]+" "+i[c-1]+" "+i[c];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:s,14:r,15:f,16:y,17:w,18:S,19:18,20:N,21:Y,22:z,23:R,24:H,25:x,26:_,27:b,28:A,29:X,30:U,31:$,33:g,35:m,36:I,37:24,38:W,40:F},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:s,14:r,15:f,16:y,17:w,18:S,19:18,20:N,21:Y,22:z,23:R,24:H,25:x,26:_,27:b,28:A,29:X,30:U,31:$,33:g,35:m,36:I,37:24,38:W,40:F},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:l(function(a,h){if(h.recoverable)this.trace(a);else{var d=new Error(a);throw d.hash=h,d}},"parseError"),parse:l(function(a){var h=this,d=[0],u=[],C=[null],i=[],M=this.table,c="",B=0,o=0,D=0,E=2,V=1,P=i.slice.call(arguments,1),L=Object.create(this.lexer),O={yy:{}};for(var tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,tt)&&(O.yy[tt]=this.yy[tt]);L.setInput(a,O.yy),O.yy.lexer=L,O.yy.parser=this,typeof L.yylloc>"u"&&(L.yylloc={});var et=L.yylloc;i.push(et);var lt=L.options&&L.options.ranges;typeof O.yy.parseError=="function"?this.parseError=O.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ut(Z){d.length=d.length-2*Z,C.length=C.length-Z,i.length=i.length-Z}l(ut,"popStack");function dt(){var Z;return Z=u.pop()||L.lex()||V,typeof Z!="number"&&(Z instanceof Array&&(u=Z,Z=u.pop()),Z=h.symbols_[Z]||Z),Z}l(dt,"lex");for(var j,nt,K,q,Bi,Mt,ft={},bt,it,ae,xt;;){if(K=d[d.length-1],this.defaultActions[K]?q=this.defaultActions[K]:((j===null||typeof j>"u")&&(j=dt()),q=M[K]&&M[K][j]),typeof q>"u"||!q.length||!q[0]){var Et="";xt=[];for(bt in M[K])this.terminals_[bt]&&bt>E&&xt.push("'"+this.terminals_[bt]+"'");L.showPosition?Et="Parse error on line "+(B+1)+`:
|
|
2
|
+
`+L.showPosition()+`
|
|
3
|
+
Expecting `+xt.join(", ")+", got '"+(this.terminals_[j]||j)+"'":Et="Parse error on line "+(B+1)+": Unexpected "+(j==V?"end of input":"'"+(this.terminals_[j]||j)+"'"),this.parseError(Et,{text:L.match,token:this.terminals_[j]||j,line:L.yylineno,loc:et,expected:xt})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+j);switch(q[0]){case 1:d.push(j),C.push(L.yytext),i.push(L.yylloc),d.push(q[1]),j=null,nt?(j=nt,nt=null):(o=L.yyleng,c=L.yytext,B=L.yylineno,et=L.yylloc,D>0&&D--);break;case 2:if(it=this.productions_[q[1]][1],ft.$=C[C.length-it],ft._$={first_line:i[i.length-(it||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(it||1)].first_column,last_column:i[i.length-1].last_column},lt&&(ft._$.range=[i[i.length-(it||1)].range[0],i[i.length-1].range[1]]),Mt=this.performAction.apply(ft,[c,o,B,O.yy,q[1],C,i].concat(P)),typeof Mt<"u")return Mt;it&&(d=d.slice(0,-1*it*2),C=C.slice(0,-1*it),i=i.slice(0,-1*it)),d.push(this.productions_[q[1]][0]),C.push(ft.$),i.push(ft._$),ae=M[d[d.length-2]][d[d.length-1]],d.push(ae);break;case 3:return!0}}return!0},"parse")},p=(function(){var T={EOF:1,parseError:l(function(h,d){if(this.yy.parser)this.yy.parser.parseError(h,d);else throw new Error(h)},"parseError"),setInput:l(function(a,h){return this.yy=h||this.yy||{},this._input=a,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 a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var h=a.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:l(function(a){var h=a.length,d=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;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),d.length-1&&(this.yylineno-=d.length-1);var C=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:d?(d.length===u.length?this.yylloc.first_column:0)+u[u.length-d.length].length-d[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),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(a){this.unput(this.match.slice(a))},"less"),pastInput:l(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var a=this.pastInput(),h=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
5
|
+
`+h+"^"},"showPosition"),test_match:l(function(a,h){var d,u,C;if(this.options.backtrack_lexer&&(C={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&&(C.yylloc.range=this.yylloc.range.slice(0))),u=a[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+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,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(a[0].length),this.matched+=a[0],d=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),d)return d;if(this._backtrack){for(var i in C)this[i]=C[i];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,h,d,u;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),i=0;i<C.length;i++)if(d=this._input.match(this.rules[C[i]]),d&&(!h||d[0].length>h[0].length)){if(h=d,u=i,this.options.backtrack_lexer){if(a=this.test_match(d,C[i]),a!==!1)return a;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(a=this.test_match(h,C[u]),a!==!1?a:!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 h=this.next();return h||this.lex()},"lex"),begin:l(function(h){this.conditionStack.push(h)},"begin"),popState:l(function(){var h=this.conditionStack.length-1;return h>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(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:l(function(h){this.begin(h)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(h,d,u,C){var i=C;switch(u){case 0:return this.begin("open_directive"),"open_directive";break;case 1:return this.begin("acc_title"),31;break;case 2:return this.popState(),"acc_title_value";break;case 3:return this.begin("acc_descr"),33;break;case 4:return this.popState(),"acc_descr_value";break;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 T})();k.lexer=p;function v(){this.yy={}}return l(v,"Parser"),v.prototype=k,k.Parser=v,new v})();Gt.parser=Gt;var ti=Gt;Q.default.extend(Ne.default);Q.default.extend(Re.default);Q.default.extend(ze.default);var Oe={friday:5,saturday:6},J="",Zt="",Qt=void 0,Kt="",yt=[],gt=[],Jt=new Map,te=[],St=[],pt="",ee="",He=["active","done","crit","milestone","vert"],ie=[],ht="",Tt=!1,se=!1,re="sunday",Ct="saturday",Xt=0,ei=l(function(){te=[],St=[],pt="",ie=[],_t=0,qt=void 0,Dt=void 0,G=[],J="",Zt="",ee="",Qt=void 0,Kt="",yt=[],gt=[],Tt=!1,se=!1,Xt=0,Jt=new Map,ht="",ue(),re="sunday",Ct="saturday"},"clear"),ii=l(function(t){ht=t},"setDiagramId"),si=l(function(t){Zt=t},"setAxisFormat"),ri=l(function(){return Zt},"getAxisFormat"),ni=l(function(t){Qt=t},"setTickInterval"),ai=l(function(){return Qt},"getTickInterval"),oi=l(function(t){Kt=t},"setTodayMarker"),ci=l(function(){return Kt},"getTodayMarker"),li=l(function(t){J=t},"setDateFormat"),ui=l(function(){Tt=!0},"enableInclusiveEndDates"),di=l(function(){return Tt},"endDatesAreInclusive"),fi=l(function(){se=!0},"enableTopAxis"),hi=l(function(){return se},"topAxisEnabled"),mi=l(function(t){ee=t},"setDisplayMode"),ki=l(function(){return ee},"getDisplayMode"),yi=l(function(){return J},"getDateFormat"),Be=l((t,e)=>{let n=e.toLowerCase().split(/[\s,]+/).filter(s=>s!=="");return[...new Set([...t,...n])]},"mergeTokens"),gi=l(function(t){yt=Be(yt,t)},"setIncludes"),pi=l(function(){return yt},"getIncludes"),vi=l(function(t){gt=Be(gt,t)},"setExcludes"),Ti=l(function(){return gt},"getExcludes"),bi=l(function(){return Jt},"getLinks"),xi=l(function(t){pt=t,te.push(t)},"addSection"),wi=l(function(){return te},"getSections"),_i=l(function(){let t=We(),e=10,n=0;for(;!t&&n<e;)t=We(),n++;return St=G,St},"getTasks"),je=l(function(t,e,n,s){let r=t.format(e.trim()),f=t.format("YYYY-MM-DD");return s.includes(r)||s.includes(f)?!1:n.includes("weekends")&&(t.isoWeekday()===Oe[Ct]||t.isoWeekday()===Oe[Ct]+1)||n.includes(t.format("dddd").toLowerCase())?!0:n.includes(r)||n.includes(f)},"isInvalidDate"),Di=l(function(t){re=t},"setWeekday"),Si=l(function(){return re},"getWeekday"),Ci=l(function(t){Ct=t},"setWeekend"),Ge=l(function(t,e,n,s){if(!n.length||t.manualEndTime)return;let r;t.startTime instanceof Date?r=(0,Q.default)(t.startTime):r=(0,Q.default)(t.startTime,e,!0),r=r.add(1,"d");let f;t.endTime instanceof Date?f=(0,Q.default)(t.endTime):f=(0,Q.default)(t.endTime,e,!0);let[y,w]=Mi(r,f,e,n,s);t.endTime=y.toDate(),t.renderEndTime=w},"checkTaskDates"),Mi=l(function(t,e,n,s,r){let f=!1,y=null,w=e.add(1e4,"d");for(;t<=e;){if(f||(y=e.toDate()),f=je(t,n,s,r),f&&(e=e.add(1,"d"),e>w))throw new Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");t=t.add(1,"d")}return[e,y]},"fixTaskDates"),Ut=l(function(t,e,n){if(n=n.trim(),l(w=>{let S=w.trim();return S==="x"||S==="X"},"isTimestampFormat")(e)&&/^\d+$/.test(n))return new Date(Number(n));let f=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(f!==null){let w=null;for(let N of f.groups.ids.split(" ")){let Y=ct(N);Y!==void 0&&(!w||Y.endTime>w.endTime)&&(w=Y)}if(w)return w.endTime;let S=new Date;return S.setHours(0,0,0,0),S}let y=(0,Q.default)(n,e.trim(),!0);if(y.isValid())return y.toDate();{rt.debug("Invalid date:"+n),rt.debug("With date format:"+e.trim());let w=new Date(n);if(w===void 0||isNaN(w.getTime())||w.getFullYear()<-1e4||w.getFullYear()>1e4)throw new Error("Invalid date:"+n);return w}},"getStartDate"),Xe=l(function(t){let e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?[Number.parseFloat(e[1]),e[2]]:[NaN,"ms"]},"parseDuration"),Ue=l(function(t,e,n,s=!1){n=n.trim();let f=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(f!==null){let Y=null;for(let R of f.groups.ids.split(" ")){let H=ct(R);H!==void 0&&(!Y||H.startTime<Y.startTime)&&(Y=H)}if(Y)return Y.startTime;let z=new Date;return z.setHours(0,0,0,0),z}let y=(0,Q.default)(n,e.trim(),!0);if(y.isValid())return s&&(y=y.add(1,"d")),y.toDate();let w=(0,Q.default)(t),[S,N]=Xe(n);if(!Number.isNaN(S)){let Y=w.add(S,N);Y.isValid()&&(w=Y)}return w.toDate()},"getEndDate"),_t=0,kt=l(function(t){return t===void 0?(_t=_t+1,"task"+_t):t},"parseId"),Ei=l(function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;let s=n.split(","),r={};ne(s,r,He);for(let y=0;y<s.length;y++)s[y]=s[y].trim();let f="";switch(s.length){case 1:r.id=kt(),r.startTime=t.endTime,f=s[0];break;case 2:r.id=kt(),r.startTime=Ut(void 0,J,s[0]),f=s[1];break;case 3:r.id=kt(s[0]),r.startTime=Ut(void 0,J,s[1]),f=s[2];break;default:}return f&&(r.endTime=Ue(r.startTime,J,f,Tt),r.manualEndTime=(0,Q.default)(f,"YYYY-MM-DD",!0).isValid(),Ge(r,J,gt,yt)),r},"compileData"),Ii=l(function(t,e){let n;e.substr(0,1)===":"?n=e.substr(1,e.length):n=e;let s=n.split(","),r={};ne(s,r,He);for(let f=0;f<s.length;f++)s[f]=s[f].trim();switch(s.length){case 1:r.id=kt(),r.startTime={type:"prevTaskEnd",id:t},r.endTime={data:s[0]};break;case 2:r.id=kt(),r.startTime={type:"getStartDate",startData:s[0]},r.endTime={data:s[1]};break;case 3:r.id=kt(s[0]),r.startTime={type:"getStartDate",startData:s[1]},r.endTime={data:s[2]};break;default:}return r},"parseData"),qt,Dt,G=[],qe={},Yi=l(function(t,e){let n={section:pt,type:pt,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},s=Ii(Dt,e);n.raw.startTime=s.startTime,n.raw.endTime=s.endTime,n.id=s.id,n.prevTaskId=Dt,n.active=s.active,n.done=s.done,n.crit=s.crit,n.milestone=s.milestone,n.vert=s.vert,n.vert?n.order=-1:(n.order=Xt,Xt++);let r=G.push(n);Dt=n.id,qe[n.id]=r-1},"addTask"),ct=l(function(t){let e=qe[t];return G[e]},"findTaskById"),$i=l(function(t,e){let n={section:pt,type:pt,description:t,task:t,classes:[]},s=Ei(qt,e);n.startTime=s.startTime,n.endTime=s.endTime,n.id=s.id,n.active=s.active,n.done=s.done,n.crit=s.crit,n.milestone=s.milestone,n.vert=s.vert,qt=n,St.push(n)},"addTaskOrg"),We=l(function(){let t=l(function(n){let s=G[n],r="";switch(G[n].raw.startTime.type){case"prevTaskEnd":{let f=ct(s.prevTaskId);s.startTime=f.endTime;break}case"getStartDate":r=Ut(void 0,J,G[n].raw.startTime.startData),r&&(G[n].startTime=r);break}return G[n].startTime&&(G[n].endTime=Ue(G[n].startTime,J,G[n].raw.endTime.data,Tt),G[n].endTime&&(G[n].processed=!0,G[n].manualEndTime=(0,Q.default)(G[n].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Ge(G[n],J,gt,yt))),G[n].processed},"compileTask"),e=!0;for(let[n,s]of G.entries())t(n),e=e&&s.processed;return e},"compileTasks"),Li=l(function(t,e){let n=e;ot().securityLevel!=="loose"&&(n=(0,Pe.sanitizeUrl)(e)),t.split(",").forEach(function(s){ct(s)!==void 0&&(Qe(s,()=>{window.open(n,"_self")}),Jt.set(s,n))}),Ze(t,"clickable")},"setLink"),Ze=l(function(t,e){t.split(",").forEach(function(n){let s=ct(n);s!==void 0&&s.classes.push(e)})},"setClass"),Ai=l(function(t,e,n){if(ot().securityLevel!=="loose"||e===void 0)return;let s=[];if(typeof n=="string"){s=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let f=0;f<s.length;f++){let y=s[f].trim();y.startsWith('"')&&y.endsWith('"')&&(y=y.substr(1,y.length-2)),s[f]=y}}s.length===0&&s.push(t),ct(t)!==void 0&&Qe(t,()=>{Ye.runFunc(e,...s)})},"setClickFun"),Qe=l(function(t,e){ie.push(function(){let n=ht?`${ht}-${t}`:t,s=document.querySelector(`[id="${n}"]`);s!==null&&s.addEventListener("click",function(){e()})},function(){let n=ht?`${ht}-${t}`:t,s=document.querySelector(`[id="${n}-text"]`);s!==null&&s.addEventListener("click",function(){e()})})},"pushFun"),Fi=l(function(t,e,n){t.split(",").forEach(function(s){Ai(s,e,n)}),Ze(t,"clickable")},"setClickEvent"),Oi=l(function(t){ie.forEach(function(e){e(t)})},"bindFunctions"),Wi={getConfig:l(()=>ot().gantt,"getConfig"),clear:ei,setDateFormat:li,getDateFormat:yi,enableInclusiveEndDates:ui,endDatesAreInclusive:di,enableTopAxis:fi,topAxisEnabled:hi,setAxisFormat:si,getAxisFormat:ri,setTickInterval:ni,getTickInterval:ai,setTodayMarker:oi,getTodayMarker:ci,setAccTitle:de,getAccTitle:fe,setDiagramTitle:ke,getDiagramTitle:ye,setDiagramId:ii,setDisplayMode:mi,getDisplayMode:ki,setAccDescription:he,getAccDescription:me,addSection:xi,getSections:wi,getTasks:_i,addTask:Yi,findTaskById:ct,addTaskOrg:$i,setIncludes:gi,getIncludes:pi,setExcludes:vi,getExcludes:Ti,setClickEvent:Fi,setLink:Li,getLinks:bi,bindFunctions:Oi,parseDuration:Xe,isInvalidDate:je,setWeekday:Di,getWeekday:Si,setWeekend:Ci};function ne(t,e,n){let s=!0;for(;s;)s=!1,n.forEach(function(r){let f="^\\s*"+r+"\\s*$",y=new RegExp(f);t[0].match(y)&&(e[r]=!0,t.shift(1),s=!0)})}l(ne,"getTaskTags");mt.default.extend(Ke.default);var Vi=l(function(){rt.debug("Something is calling, setConf, remove the call")},"setConf"),Ve={monday:_e,tuesday:De,wednesday:Se,thursday:Ce,friday:Me,saturday:Ee,sunday:we},Pi=l((t,e)=>{let n=[...t].map(()=>-1/0),s=[...t].sort((f,y)=>f.startTime-y.startTime||f.order-y.order),r=0;for(let f of s)for(let y=0;y<n.length;y++)if(f.startTime>=n[y]){n[y]=f.endTime,f.order=y+e,y>r&&(r=y);break}return r},"getMaxIntersections"),st,jt=1e4,Ni=l(function(t,e,n,s){let r=ot().gantt;s.db.setDiagramId(e);let f=ot().securityLevel,y;f==="sandbox"&&(y=vt("#i"+e));let w=f==="sandbox"?vt(y.nodes()[0].contentDocument.body):vt("body"),S=f==="sandbox"?y.nodes()[0].contentDocument:document,N=S.getElementById(e);st=N.parentElement.offsetWidth,st===void 0&&(st=1200),r.useWidth!==void 0&&(st=r.useWidth);let Y=s.db.getTasks(),z=Y.filter(k=>!k.vert),R=[];for(let k of z)R.push(k.type);R=F(R);let H={},x=2*r.topPadding;if(s.db.getDisplayMode()==="compact"||r.displayMode==="compact"){let k={};for(let v of z)k[v.section]===void 0?k[v.section]=[v]:k[v.section].push(v);let p=0;for(let v of Object.keys(k)){let T=Pi(k[v],p)+1;p+=T,x+=T*(r.barHeight+r.barGap),H[v]=T}}else{x+=z.length*(r.barHeight+r.barGap);for(let k of R)H[k]=z.filter(p=>p.type===k).length}N.setAttribute("viewBox","0 0 "+st+" "+x);let _=w.select(`[id="${e}"]`),b=Ie().domain([pe(Y,function(k){return k.startTime}),ge(Y,function(k){return k.endTime})]).rangeRound([0,st-r.leftPadding-r.rightPadding]);function A(k,p){let v=k.startTime,T=p.startTime,a=0;return v>T?a=1:v<T&&(a=-1),a}l(A,"taskCompare"),Y.sort(A),X(Y,st,x),le(_,x,st,r.useMaxWidth),_.append("text").text(s.db.getDiagramTitle()).attr("x",st/2).attr("y",r.titleTopMargin).attr("class","titleText");function X(k,p,v){let T=r.barHeight,a=T+r.barGap,h=r.topPadding,d=r.leftPadding,u=xe().domain([0,R.length]).range(["#00B9FA","#F95002"]).interpolate(be);$(a,h,d,p,v,k,s.db.getExcludes(),s.db.getIncludes()),m(d,h,p,v),U(k,a,h,d,T,u,p,v),I(a,h,d,T,u),W(d,h,p,v)}l(X,"makeGantt");function U(k,p,v,T,a,h,d){k.sort((o,D)=>o.vert===D.vert?0:o.vert?1:-1);let u=k.filter(o=>!o.vert),i=[...new Set(u.map(o=>o.order))].map(o=>u.find(D=>D.order===o));_.append("g").selectAll("rect").data(i).enter().append("rect").attr("x",0).attr("y",function(o,D){return D=o.order,D*p+v-2}).attr("width",function(){return d-r.rightPadding/2}).attr("height",p).attr("class",function(o){for(let[D,E]of R.entries())if(o.type===E)return"section section"+D%r.numberSectionStyles;return"section section0"}).enter();let M=_.append("g").selectAll("rect").data(k).enter(),c=s.db.getLinks();if(M.append("rect").attr("id",function(o){return e+"-"+o.id}).attr("rx",3).attr("ry",3).attr("x",function(o){return o.milestone?b(o.startTime)+T+.5*(b(o.endTime)-b(o.startTime))-.5*a:b(o.startTime)+T}).attr("y",function(o,D){return D=o.order,o.vert?r.gridLineStartPadding:D*p+v}).attr("width",function(o){return o.milestone?a:o.vert?.08*a:b(o.renderEndTime||o.endTime)-b(o.startTime)}).attr("height",function(o){return o.vert?u.length*(r.barHeight+r.barGap)+r.barHeight*2:a}).attr("transform-origin",function(o,D){return D=o.order,(b(o.startTime)+T+.5*(b(o.endTime)-b(o.startTime))).toString()+"px "+(D*p+v+.5*a).toString()+"px"}).attr("class",function(o){let D="task",E="";o.classes.length>0&&(E=o.classes.join(" "));let V=0;for(let[L,O]of R.entries())o.type===O&&(V=L%r.numberSectionStyles);let P="";return o.active?o.crit?P+=" activeCrit":P=" active":o.done?o.crit?P=" doneCrit":P=" done":o.crit&&(P+=" crit"),P.length===0&&(P=" task"),o.milestone&&(P=" milestone "+P),o.vert&&(P=" vert "+P),P+=V,P+=" "+E,D+P}),M.append("text").attr("id",function(o){return e+"-"+o.id+"-text"}).text(function(o){return o.task}).attr("font-size",r.fontSize).attr("x",function(o){let D=b(o.startTime),E=b(o.renderEndTime||o.endTime);if(o.milestone&&(D+=.5*(b(o.endTime)-b(o.startTime))-.5*a,E=D+a),o.vert)return b(o.startTime)+T;let V=this.getBBox().width;return V>E-D?E+V+1.5*r.leftPadding>d?D+T-5:E+T+5:(E-D)/2+D+T}).attr("y",function(o,D){return o.vert?r.gridLineStartPadding+u.length*(r.barHeight+r.barGap)+60:(D=o.order,D*p+r.barHeight/2+(r.fontSize/2-2)+v)}).attr("text-height",a).attr("class",function(o){let D=b(o.startTime),E=b(o.endTime);o.milestone&&(E=D+a);let V=this.getBBox().width,P="";o.classes.length>0&&(P=o.classes.join(" "));let L=0;for(let[tt,et]of R.entries())o.type===et&&(L=tt%r.numberSectionStyles);let O="";return o.active&&(o.crit?O="activeCritText"+L:O="activeText"+L),o.done?o.crit?O=O+" doneCritText"+L:O=O+" doneText"+L:o.crit&&(O=O+" critText"+L),o.milestone&&(O+=" milestoneText"),o.vert&&(O+=" vertText"),V>E-D?E+V+1.5*r.leftPadding>d?P+" taskTextOutsideLeft taskTextOutside"+L+" "+O:P+" taskTextOutsideRight taskTextOutside"+L+" "+O+" width-"+V:P+" taskText taskText"+L+" "+O+" width-"+V}),ot().securityLevel==="sandbox"){let o;o=vt("#i"+e);let D=o.nodes()[0].contentDocument;M.filter(function(E){return c.has(E.id)}).each(function(E){var V=D.querySelector("#"+CSS.escape(e+"-"+E.id)),P=D.querySelector("#"+CSS.escape(e+"-"+E.id+"-text"));let L=V.parentNode;var O=D.createElement("a");O.setAttribute("xlink:href",c.get(E.id)),O.setAttribute("target","_top"),L.appendChild(O),O.appendChild(V),O.appendChild(P)})}}l(U,"drawRects");function $(k,p,v,T,a,h,d,u){if(d.length===0&&u.length===0)return;let C,i;for(let{startTime:E,endTime:V}of h)(C===void 0||E<C)&&(C=E),(i===void 0||V>i)&&(i=V);if(!C||!i)return;if((0,mt.default)(i).diff((0,mt.default)(C),"year")>5){rt.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");return}let M=s.db.getDateFormat(),c=[],B=null,o=(0,mt.default)(C);for(;o.valueOf()<=i;)s.db.isInvalidDate(o,M,d,u)?B?B.end=o:B={start:o,end:o}:B&&(c.push(B),B=null),o=o.add(1,"d");_.append("g").selectAll("rect").data(c).enter().append("rect").attr("id",E=>e+"-exclude-"+E.start.format("YYYY-MM-DD")).attr("x",E=>b(E.start.startOf("day"))+v).attr("y",r.gridLineStartPadding).attr("width",E=>b(E.end.endOf("day"))-b(E.start.startOf("day"))).attr("height",a-p-r.gridLineStartPadding).attr("transform-origin",function(E,V){return(b(E.start)+v+.5*(b(E.end)-b(E.start))).toString()+"px "+(V*k+.5*a).toString()+"px"}).attr("class","exclude-range")}l($,"drawExcludeDays");function g(k,p,v,T){if(v<=0||k>p)return 1/0;let a=p-k,h=mt.default.duration({[T??"day"]:v}).asMilliseconds();return h<=0?1/0:Math.ceil(a/h)}l(g,"getEstimatedTickCount");function m(k,p,v,T){let a=s.db.getDateFormat(),h=s.db.getAxisFormat(),d;h?d=h:a==="D"?d="%d":d=r.axisFormat??"%Y-%m-%d";let u=Te(b).tickSize(-T+p+r.gridLineStartPadding).tickFormat(Ot(d)),i=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(s.db.getTickInterval()||r.tickInterval);if(i!==null){let M=parseInt(i[1],10);if(isNaN(M)||M<=0)rt.warn(`Invalid tick interval value: "${i[1]}". Skipping custom tick interval.`);else{let c=i[2],B=s.db.getWeekday()||r.weekday,o=b.domain(),D=o[0],E=o[1],V=g(D,E,M,c);if(V>jt)rt.warn(`The tick interval "${M}${c}" would generate ${V} ticks, which exceeds the maximum allowed (${jt}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(c){case"millisecond":u.ticks(It.every(M));break;case"second":u.ticks(Yt.every(M));break;case"minute":u.ticks($t.every(M));break;case"hour":u.ticks(Lt.every(M));break;case"day":u.ticks(At.every(M));break;case"week":u.ticks(Ve[B].every(M));break;case"month":u.ticks(Ft.every(M));break}}}if(_.append("g").attr("class","grid").attr("transform","translate("+k+", "+(T-50)+")").call(u).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),s.db.topAxisEnabled()||r.topAxis){let M=ve(b).tickSize(-T+p+r.gridLineStartPadding).tickFormat(Ot(d));if(i!==null){let c=parseInt(i[1],10);if(isNaN(c)||c<=0)rt.warn(`Invalid tick interval value: "${i[1]}". Skipping custom tick interval.`);else{let B=i[2],o=s.db.getWeekday()||r.weekday,D=b.domain(),E=D[0],V=D[1];if(g(E,V,c,B)<=jt)switch(B){case"millisecond":M.ticks(It.every(c));break;case"second":M.ticks(Yt.every(c));break;case"minute":M.ticks($t.every(c));break;case"hour":M.ticks(Lt.every(c));break;case"day":M.ticks(At.every(c));break;case"week":M.ticks(Ve[o].every(c));break;case"month":M.ticks(Ft.every(c));break}}}_.append("g").attr("class","grid").attr("transform","translate("+k+", "+p+")").call(M).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}l(m,"makeGrid");function I(k,p){let v=0,T=Object.keys(H).map(a=>[a,H[a]]);_.append("g").selectAll("text").data(T).enter().append(function(a){let h=a[0].split(ce.lineBreakRegex),d=-(h.length-1)/2,u=S.createElementNS("http://www.w3.org/2000/svg","text");u.setAttribute("dy",d+"em");for(let[C,i]of h.entries()){let M=S.createElementNS("http://www.w3.org/2000/svg","tspan");M.setAttribute("alignment-baseline","central"),M.setAttribute("x","10"),C>0&&M.setAttribute("dy","1em"),M.textContent=i,u.appendChild(M)}return u}).attr("x",10).attr("y",function(a,h){if(h>0)for(let d=0;d<h;d++)return v+=T[h-1][1],a[1]*k/2+v*k+p;else return a[1]*k/2+p}).attr("font-size",r.sectionFontSize).attr("class",function(a){for(let[h,d]of R.entries())if(a[0]===d)return"sectionTitle sectionTitle"+h%r.numberSectionStyles;return"sectionTitle"})}l(I,"vertLabels");function W(k,p,v,T){let a=s.db.getTodayMarker();if(a==="off")return;let h=_.append("g").attr("class","today"),d=new Date,u=h.append("line");u.attr("x1",b(d)+k).attr("x2",b(d)+k).attr("y1",r.titleTopMargin).attr("y2",T-r.titleTopMargin).attr("class","today"),a!==""&&u.attr("style",a.replace(/,/g,";"))}l(W,"drawToday");function F(k){let p={},v=[];for(let T=0,a=k.length;T<a;++T)Object.prototype.hasOwnProperty.call(p,k[T])||(p[k[T]]=!0,v.push(k[T]));return v}l(F,"checkUnique")},"draw"),Ri={setConf:Vi,draw:Ni},zi=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 \u2014 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"),Hi=zi,Zi={parser:ti,db:Wi,renderer:Ri,styles:Hi};export{Zi as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r,b as e}from"./chunk-CCQNES6G.js";import"./chunk-FK4OKHO7.js";import"./chunk-OOJM4CTU.js";export{r as GitGraphModule,e as createGitGraphServices};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import{a as fe}from"./chunk-HRJ5UBVC.js";import{a as $e}from"./chunk-J4SQIVOP.js";import{a as pe}from"./chunk-MNHOAW4R.js";import"./chunk-ZMBQGVIF.js";import"./chunk-5DJUZA4F.js";import"./chunk-YICKNY6Y.js";import"./chunk-R7CM4BQN.js";import"./chunk-SNGMH3JW.js";import"./chunk-EXFMYL6U.js";import"./chunk-WSHCWW4Q.js";import"./chunk-ZNREFWKG.js";import"./chunk-FZLE27CN.js";import"./chunk-CD5RYVNW.js";import"./chunk-JFI5BOLY.js";import"./chunk-IRNO36C3.js";import"./chunk-43RBMH4Y.js";import"./chunk-K2JFJOPP.js";import"./chunk-CCQNES6G.js";import"./chunk-FK4OKHO7.js";import{h as le,o as me,p as ge}from"./chunk-JAORNH2M.js";import"./chunk-JBQZ5UCE.js";import{N as E,T as re,U as ae,V as oe,W as se,X as ne,Y as ce,Z as ie,_ as q,ca as de,k as te,u as F}from"./chunk-NLCJ5AKJ.js";import{b as w,h as he}from"./chunk-3CEAP2V5.js";import{a as l}from"./chunk-6LQNQPBM.js";import"./chunk-OOJM4CTU.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Ee=te.gitGraph,D=l(()=>me({...Ee,...F().gitGraph}),"getConfig"),d=new fe(()=>{let e=D(),t=e.mainBranchName,r=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:r}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});function j(){return le({length:7})}l(j,"getID");function xe(e,t){let r=Object.create(null);return e.reduce((s,n)=>{let i=t(n);return r[i]||(r[i]=!0,s.push(n)),s},[])}l(xe,"uniqBy");var Te=l(function(e){d.records.direction=e},"setDirection"),Le=l(function(e){w.debug("options str",e),e=e?.trim(),e=e||"{}";try{d.records.options=JSON.parse(e)}catch(t){w.error("error while parsing gitGraph options",t.message)}},"setOptions"),Me=l(function(){return d.records.options},"getOptions"),Pe=l(function(e){let t=e.msg,r=e.id,s=e.type,n=e.tags;w.info("commit",t,r,s,n),w.debug("Entering commit:",t,r,s,n);let i=D();r=E.sanitizeText(r,i),t=E.sanitizeText(t,i),n=n?.map(a=>E.sanitizeText(a,i));let o={id:r||d.records.seq+"-"+j(),message:t,seq:d.records.seq++,type:s??x.NORMAL,tags:n??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=o,w.info("main branch",i.mainBranchName),d.records.commits.has(o.id)&&w.warn(`Commit ID ${o.id} already exists`),d.records.commits.set(o.id,o),d.records.branches.set(d.records.currBranch,o.id),w.debug("in pushCommit "+o.id)},"commit"),Re=l(function(e){let t=e.name,r=e.order;if(t=E.sanitizeText(t,D()),d.records.branches.has(t))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 ${t}")`);d.records.branches.set(t,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(t,{name:t,order:r}),ue(t),w.debug("in createBranch")},"branch"),Oe=l(e=>{let t=e.branch,r=e.id,s=e.type,n=e.tags,i=D();t=E.sanitizeText(t,i),r&&(r=E.sanitizeText(r,i));let o=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(t),h=o?d.records.commits.get(o):void 0,g=a?d.records.commits.get(a):void 0;if(h&&g&&h.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(d.records.currBranch===t){let c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},c}if(h===void 0||!h){let c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},c}if(!d.records.branches.has(t)){let c=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw c.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},c}if(g===void 0||!g){let c=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw c.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},c}if(h===g){let c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},c}if(r&&d.records.commits.has(r)){let c=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id");throw c.hash={text:`merge ${t} ${r} ${s} ${n?.join(" ")}`,token:`merge ${t} ${r} ${s} ${n?.join(" ")}`,expected:[`merge ${t} ${r}_UNIQUE ${s} ${n?.join(" ")}`]},c}let f=a||"",m={id:r||`${d.records.seq}-${j()}`,message:`merged branch ${t} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,f],branch:d.records.currBranch,type:x.MERGE,customType:s,customId:!!r,tags:n??[]};d.records.head=m,d.records.commits.set(m.id,m),d.records.branches.set(d.records.currBranch,m.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),Ie=l(function(e){let t=e.id,r=e.targetId,s=e.tags,n=e.parent;w.debug("Entering cherryPick:",t,r,s);let i=D();if(t=E.sanitizeText(t,i),r=E.sanitizeText(r,i),s=s?.map(h=>E.sanitizeText(h,i)),n=E.sanitizeText(n,i),!t||!d.records.commits.has(t)){let h=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw h.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},h}let o=d.records.commits.get(t);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&!(Array.isArray(o.parents)&&o.parents.includes(n)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let a=o.branch;if(o.type===x.MERGE&&!n)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!d.records.commits.has(r)){if(a===d.records.currBranch){let m=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw m.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},m}let h=d.records.branches.get(d.records.currBranch);if(h===void 0||!h){let m=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw m.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},m}let g=d.records.commits.get(h);if(g===void 0||!g){let m=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw m.hash={text:`cherryPick ${t} ${r}`,token:`cherryPick ${t} ${r}`,expected:["cherry-pick abc"]},m}let f={id:d.records.seq+"-"+j(),message:`cherry-picked ${o?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,o.id],branch:d.records.currBranch,type:x.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${o.id}${o.type===x.MERGE?`|parent:${n}`:""}`]};d.records.head=f,d.records.commits.set(f.id,f),d.records.branches.set(d.records.currBranch,f.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ue=l(function(e){if(e=E.sanitizeText(e,D()),d.records.branches.has(e)){d.records.currBranch=e;let t=d.records.branches.get(d.records.currBranch);t===void 0||!t?d.records.head=null:d.records.head=d.records.commits.get(t)??null}else{let t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},"checkout");function Z(e,t,r){let s=e.indexOf(t);s===-1?e.push(r):e.splice(s,1,r)}l(Z,"upsert");function J(e){let t=e.reduce((n,i)=>n.seq>i.seq?n:i,e[0]),r="";e.forEach(function(n){n===t?r+=" *":r+=" |"});let s=[r,t.id,t.seq];for(let n in d.records.branches)d.records.branches.get(n)===t.id&&s.push(n);if(w.debug(s.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=d.records.commits.get(t.parents[0]);Z(e,t,n),t.parents[1]&&e.push(d.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let n=d.records.commits.get(t.parents[0]);Z(e,t,n)}}e=xe(e,n=>n.id),J(e)}l(J,"prettyPrintCommitHistory");var _e=l(function(){w.debug(d.records.commits);let e=be()[0];J([e])},"prettyPrint"),Ge=l(function(){d.reset(),re()},"clear"),De=l(function(){return[...d.records.branchConfig.values()].map((t,r)=>t.order!==null&&t.order!==void 0?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),We=l(function(){return d.records.branches},"getBranches"),qe=l(function(){return d.records.commits},"getCommits"),be=l(function(){let e=[...d.records.commits.values()];return e.forEach(function(t){w.debug(t.id)}),e.sort((t,r)=>t.seq-r.seq),e},"getCommitsArray"),Ae=l(function(){return d.records.currBranch},"getCurrentBranch"),He=l(function(){return d.records.direction},"getDirection"),Se=l(function(){return d.records.head},"getHead"),we={commitType:x,getConfig:D,setDirection:Te,setOptions:Le,getOptions:Me,commit:Pe,branch:Re,merge:Oe,cherryPick:Ie,checkout:ue,prettyPrint:_e,clear:Ge,getBranchesAsObjArray:De,getBranches:We,getCommits:qe,getCommitsArray:be,getCurrentBranch:Ae,getDirection:He,getHead:Se,setAccTitle:ae,getAccTitle:oe,getAccDescription:ne,setAccDescription:se,setDiagramTitle:ce,getDiagramTitle:ie},Ne=l((e,t)=>{$e(e,t),e.dir&&t.setDirection(e.dir);for(let r of e.statements)Fe(r,t)},"populate"),Fe=l((e,t)=>{let s={Commit:l(n=>t.commit(ze(n)),"Commit"),Branch:l(n=>t.branch(Ye(n)),"Branch"),Merge:l(n=>t.merge(je(n)),"Merge"),Checkout:l(n=>t.checkout(Ke(n)),"Checkout"),CherryPicking:l(n=>t.cherryPick(Ue(n)),"CherryPicking")}[e.$type];s?s(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),ze=l(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?x[e.type]:x.NORMAL,tags:e.tags??void 0}),"parseCommit"),Ye=l(e=>({name:e.name,order:e.order??0}),"parseBranch"),je=l(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?x[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=l(e=>e.branch,"parseCheckout"),Ue=l(e=>({id:e.id,targetId:"",tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),Ve={parse:l(async e=>{let t=await pe("gitGraph",e);w.debug(t),Ne(t,we)},"parse")},O=10,I=40,L=4,P=2,_=8,K=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Q=new Set(["redux-color","redux-dark-color"]),Ze=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),G=l((e,t,r=!1)=>r&&e>0?(e-1)%(t-1)+1:e%t,"calcColorIndex"),C=new Map,v=new Map,z=30,H=new Map,Y=[],R=0,p="LR",Xe=l(()=>{C.clear(),v.clear(),H.clear(),R=0,Y=[],p="LR"},"clear"),Be=l(e=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(s=>{let n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),n.setAttribute("class","row"),n.textContent=s.trim(),t.appendChild(n)}),t},"drawText"),ke=l(e=>{let t,r,s;return p==="BT"?(r=l((n,i)=>n<=i,"comparisonFunc"),s=1/0):(r=l((n,i)=>n>=i,"comparisonFunc"),s=0),e.forEach(n=>{let i=p==="TB"||p=="BT"?v.get(n)?.y:v.get(n)?.x;i!==void 0&&r(i,s)&&(t=n,s=i)}),t},"findClosestParent"),Je=l(e=>{let t="",r=1/0;return e.forEach(s=>{let n=v.get(s).y;n<=r&&(t=s,r=n)}),t||void 0},"findClosestParentBT"),Qe=l((e,t,r)=>{let s=r,n=r,i=[];e.forEach(o=>{let a=t.get(o);if(!a)throw new Error(`Commit not found for key ${o}`);a.parents.length?(s=tt(a),n=Math.max(s,n)):i.push(a),rt(a,s)}),s=n,i.forEach(o=>{at(o,s,r)}),e.forEach(o=>{let a=t.get(o);if(a?.parents.length){let h=Je(a.parents);s=v.get(h).y-I,s<=n&&(n=s);let g=C.get(a.branch).pos,f=s-O;v.set(a.id,{x:g,y:f})}})},"setParallelBTPos"),et=l(e=>{let t=ke(e.parents.filter(s=>s!==null));if(!t)throw new Error(`Closest parent not found for commit ${e.id}`);let r=v.get(t)?.y;if(r===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return r},"findClosestParentPos"),tt=l(e=>et(e)+I,"calculateCommitPosition"),rt=l((e,t)=>{let r=C.get(e.branch);if(!r)throw new Error(`Branch not found for commit ${e.id}`);let s=r.pos,n=t+O;return v.set(e.id,{x:s,y:n}),{x:s,y:n}},"setCommitPosition"),at=l((e,t,r)=>{let s=C.get(e.branch);if(!s)throw new Error(`Branch not found for commit ${e.id}`);let n=t+r,i=s.pos;v.set(e.id,{x:i,y:n})},"setRootPosition"),ot=l((e,t,r,s,n,i)=>{let{theme:o}=q(),a=K.has(o??""),h=Q.has(o??""),g=Ze.has(o??"");if(i===x.HIGHLIGHT)e.append("rect").attr("x",r.x-10+(a?3:0)).attr("y",r.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${t.id} commit-highlight${G(n,_,h)} ${s}-outer`),e.append("rect").attr("x",r.x-6+(a?2:0)).attr("y",r.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${t.id} commit${G(n,_,h)} ${s}-inner`);else if(i===x.CHERRY_PICK)e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",a?7:10).attr("class",`commit ${t.id} ${s}`),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",a?2.5:2.75).attr("fill",g?"#000000":"#fff").attr("class",`commit ${t.id} ${s}`),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",a?2.5:2.75).attr("fill",g?"#000000":"#fff").attr("class",`commit ${t.id} ${s}`),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",g?"#000000":"#fff").attr("class",`commit ${t.id} ${s}`),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke",g?"#000000":"#fff").attr("class",`commit ${t.id} ${s}`);else{let f=e.append("circle");if(f.attr("cx",r.x),f.attr("cy",r.y),f.attr("r",a?7:10),f.attr("class",`commit ${t.id} commit${G(n,_,h)}`),i===x.MERGE){let m=e.append("circle");m.attr("cx",r.x),m.attr("cy",r.y),m.attr("r",a?5:6),m.attr("class",`commit ${s} ${t.id} commit${G(n,_,h)}`)}if(i===x.REVERSE){let m=e.append("path"),c=a?4:5;m.attr("d",`M ${r.x-c},${r.y-c}L${r.x+c},${r.y+c}M${r.x-c},${r.y+c}L${r.x+c},${r.y-c}`).attr("class",`commit ${s} ${t.id} commit${G(n,_,h)}`)}}},"drawCommitBullet"),st=l((e,t,r,s,n)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&n.showCommitLabel){let i=e.append("g"),o=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",r.y+25).attr("class","commit-label").text(t.id),h=a.node()?.getBBox();if(h&&(o.attr("x",r.posWithOffset-h.width/2-P).attr("y",r.y+13.5).attr("width",h.width+2*P).attr("height",h.height+2*P),p==="TB"||p==="BT"?(o.attr("x",r.x-(h.width+4*L+5)).attr("y",r.y-12),a.attr("x",r.x-(h.width+4*L)).attr("y",r.y+h.height-12)):a.attr("x",r.posWithOffset-h.width/2),n.rotateCommitLabel))if(p==="TB"||p==="BT")a.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),o.attr("transform","rotate(-45, "+r.x+", "+r.y+")");else{let g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;i.attr("transform","translate("+g+", "+f+") rotate(-45, "+s+", "+r.y+")")}}},"drawCommitLabel"),nt=l((e,t,r,s)=>{if(t.tags.length>0){let n=0,i=0,o=0,a=[];for(let h of t.tags.reverse()){let g=e.insert("polygon"),f=e.append("circle"),m=e.append("text").attr("y",r.y-16-n).attr("class","tag-label").text(h),c=m.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),o=Math.max(o,c.height),m.attr("x",r.posWithOffset-c.width/2),a.push({tag:m,hole:f,rect:g,yOffset:n}),n+=20}for(let{tag:h,hole:g,rect:f,yOffset:m}of a){let c=o/2,y=r.y-19.2-m;if(f.attr("class","tag-label-bkg").attr("points",`
|
|
2
|
+
${s-i/2-L/2},${y+P}
|
|
3
|
+
${s-i/2-L/2},${y-P}
|
|
4
|
+
${r.posWithOffset-i/2-L},${y-c-P}
|
|
5
|
+
${r.posWithOffset+i/2+L},${y-c-P}
|
|
6
|
+
${r.posWithOffset+i/2+L},${y+c+P}
|
|
7
|
+
${r.posWithOffset-i/2-L},${y+c+P}`),g.attr("cy",y).attr("cx",s-i/2+L/2).attr("r",1.5).attr("class","tag-hole"),p==="TB"||p==="BT"){let $=s+m;f.attr("class","tag-label-bkg").attr("points",`
|
|
8
|
+
${r.x},${$+2}
|
|
9
|
+
${r.x},${$-2}
|
|
10
|
+
${r.x+O},${$-c-2}
|
|
11
|
+
${r.x+O+i+4},${$-c-2}
|
|
12
|
+
${r.x+O+i+4},${$+c+2}
|
|
13
|
+
${r.x+O},${$+c+2}`).attr("transform","translate(12,12) rotate(45, "+r.x+","+s+")"),g.attr("cx",r.x+L/2).attr("cy",$).attr("transform","translate(12,12) rotate(45, "+r.x+","+s+")"),h.attr("x",r.x+5).attr("y",$+3).attr("transform","translate(14,14) rotate(45, "+r.x+","+s+")")}}}},"drawCommitTags"),ct=l(e=>{switch(e.customType??e.type){case x.NORMAL:return"commit-normal";case x.REVERSE:return"commit-reverse";case x.HIGHLIGHT:return"commit-highlight";case x.MERGE:return"commit-merge";case x.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),it=l((e,t,r,s)=>{let n={x:0,y:0};if(e.parents.length>0){let i=ke(e.parents);if(i){let o=s.get(i)??n;return t==="TB"?o.y+I:t==="BT"?(s.get(e.id)??n).y-I:o.x+I}}else return t==="TB"?z:t==="BT"?(s.get(e.id)??n).y-I:0;return 0},"calculatePosition"),dt=l((e,t,r)=>{let s=p==="BT"&&r?t:t+O,n=C.get(e.branch)?.pos,i=p==="TB"||p==="BT"?C.get(e.branch)?.pos:s;if(i===void 0||n===void 0)throw new Error(`Position were undefined for commit ${e.id}`);let o=K.has(q().theme??""),a=p==="TB"||p==="BT"?s:n+(o?X/2+1:-2);return{x:i,y:a,posWithOffset:s}},"getCommitPosition"),ye=l((e,t,r,s)=>{let n=e.append("g").attr("class","commit-bullets"),i=e.append("g").attr("class","commit-labels"),o=p==="TB"||p==="BT"?z:0,a=[...t.keys()],h=s.parallelCommits??!1,g=l((m,c)=>{let y=t.get(m)?.seq,$=t.get(c)?.seq;return y!==void 0&&$!==void 0?y-$:0},"sortKeys"),f=a.sort(g);p==="BT"&&(h&&Qe(f,t,o),f=f.reverse()),f.forEach(m=>{let c=t.get(m);if(!c)throw new Error(`Commit not found for key ${m}`);h&&(o=it(c,p,o,v));let y=dt(c,o,h);if(r){let $=ct(c),u=c.customType??c.type,b=C.get(c.branch)?.index??0;ot(n,c,y,$,b,u),st(i,c,y,o,s),nt(i,c,y,o)}p==="TB"||p==="BT"?v.set(c.id,{x:y.x,y:y.posWithOffset}):v.set(c.id,{x:y.posWithOffset,y:y.y}),o=p==="BT"&&h?o+I:o+I+O,o>R&&(R=o)})},"drawCommits"),ht=l((e,t,r,s,n)=>{let o=(p==="TB"||p==="BT"?r.x<s.x:r.y<s.y)?t.branch:e.branch,a=l(g=>g.branch===o,"isOnBranchToGetCurve"),h=l(g=>g.seq>e.seq&&g.seq<t.seq,"isBetweenCommits");return[...n.values()].some(g=>h(g)&&a(g))},"shouldRerouteArrow"),S=l((e,t,r=0)=>{let s=e+Math.abs(e-t)/2;if(r>5)return s;if(Y.every(o=>Math.abs(o-s)>=10))return Y.push(s),s;let i=Math.abs(e-t);return S(e,t-i/5,r+1)},"findLane"),lt=l((e,t,r,s)=>{let{theme:n}=q(),i=Q.has(n??""),o=v.get(t.id),a=v.get(r.id);if(o===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${t.id} and ${r.id}`);let h=ht(t,r,o,a,s),g="",f="",m=0,c=0,y=C.get(r.branch)?.index;r.type===x.MERGE&&t.id!==r.parents[0]&&(y=C.get(t.branch)?.index);let $;if(h){g="A 10 10, 0, 0, 0,",f="A 10 10, 0, 0, 1,",m=10,c=10;let u=o.y<a.y?S(o.y,a.y):S(a.y,o.y),b=o.x<a.x?S(o.x,a.x):S(a.x,o.x);p==="TB"?o.x<a.x?$=`M ${o.x} ${o.y} L ${b-m} ${o.y} ${f} ${b} ${o.y+c} L ${b} ${a.y-m} ${g} ${b+c} ${a.y} L ${a.x} ${a.y}`:(y=C.get(t.branch)?.index,$=`M ${o.x} ${o.y} L ${b+m} ${o.y} ${g} ${b} ${o.y+c} L ${b} ${a.y-m} ${f} ${b-c} ${a.y} L ${a.x} ${a.y}`):p==="BT"?o.x<a.x?$=`M ${o.x} ${o.y} L ${b-m} ${o.y} ${g} ${b} ${o.y-c} L ${b} ${a.y+m} ${f} ${b+c} ${a.y} L ${a.x} ${a.y}`:(y=C.get(t.branch)?.index,$=`M ${o.x} ${o.y} L ${b+m} ${o.y} ${f} ${b} ${o.y-c} L ${b} ${a.y+m} ${g} ${b-c} ${a.y} L ${a.x} ${a.y}`):o.y<a.y?$=`M ${o.x} ${o.y} L ${o.x} ${u-m} ${g} ${o.x+c} ${u} L ${a.x-m} ${u} ${f} ${a.x} ${u+c} L ${a.x} ${a.y}`:(y=C.get(t.branch)?.index,$=`M ${o.x} ${o.y} L ${o.x} ${u+m} ${f} ${o.x+c} ${u} L ${a.x-m} ${u} ${g} ${a.x} ${u-c} L ${a.x} ${a.y}`)}else g="A 20 20, 0, 0, 0,",f="A 20 20, 0, 0, 1,",m=20,c=20,p==="TB"?(o.x<a.x&&(r.type===x.MERGE&&t.id!==r.parents[0]?$=`M ${o.x} ${o.y} L ${o.x} ${a.y-m} ${g} ${o.x+c} ${a.y} L ${a.x} ${a.y}`:$=`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${f} ${a.x} ${o.y+c} L ${a.x} ${a.y}`),o.x>a.x&&(g="A 20 20, 0, 0, 0,",f="A 20 20, 0, 0, 1,",m=20,c=20,r.type===x.MERGE&&t.id!==r.parents[0]?$=`M ${o.x} ${o.y} L ${o.x} ${a.y-m} ${f} ${o.x-c} ${a.y} L ${a.x} ${a.y}`:$=`M ${o.x} ${o.y} L ${a.x+m} ${o.y} ${g} ${a.x} ${o.y+c} L ${a.x} ${a.y}`),o.x===a.x&&($=`M ${o.x} ${o.y} L ${a.x} ${a.y}`)):p==="BT"?(o.x<a.x&&(r.type===x.MERGE&&t.id!==r.parents[0]?$=`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${f} ${o.x+c} ${a.y} L ${a.x} ${a.y}`:$=`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${g} ${a.x} ${o.y-c} L ${a.x} ${a.y}`),o.x>a.x&&(g="A 20 20, 0, 0, 0,",f="A 20 20, 0, 0, 1,",m=20,c=20,r.type===x.MERGE&&t.id!==r.parents[0]?$=`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${g} ${o.x-c} ${a.y} L ${a.x} ${a.y}`:$=`M ${o.x} ${o.y} L ${a.x+m} ${o.y} ${f} ${a.x} ${o.y-c} L ${a.x} ${a.y}`),o.x===a.x&&($=`M ${o.x} ${o.y} L ${a.x} ${a.y}`)):(o.y<a.y&&(r.type===x.MERGE&&t.id!==r.parents[0]?$=`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${f} ${a.x} ${o.y+c} L ${a.x} ${a.y}`:$=`M ${o.x} ${o.y} L ${o.x} ${a.y-m} ${g} ${o.x+c} ${a.y} L ${a.x} ${a.y}`),o.y>a.y&&(r.type===x.MERGE&&t.id!==r.parents[0]?$=`M ${o.x} ${o.y} L ${a.x-m} ${o.y} ${g} ${a.x} ${o.y-c} L ${a.x} ${a.y}`:$=`M ${o.x} ${o.y} L ${o.x} ${a.y+m} ${f} ${o.x+c} ${a.y} L ${a.x} ${a.y}`),o.y===a.y&&($=`M ${o.x} ${o.y} L ${a.x} ${a.y}`));if($===void 0)throw new Error("Line definition not found");e.append("path").attr("d",$).attr("class","arrow arrow"+G(y,_,i))},"drawArrow"),mt=l((e,t)=>{let r=e.append("g").attr("class","commit-arrows");[...t.keys()].forEach(s=>{let n=t.get(s);n.parents&&n.parents.length>0&&n.parents.forEach(i=>{lt(r,t.get(i),n,t)})})},"drawArrows"),gt=l((e,t,r,s)=>{let{look:n,theme:i,themeVariables:o}=q(),{dropShadow:a,THEME_COLOR_LIMIT:h}=o,g=K.has(i??""),f=Q.has(i??""),m=e.append("g");t.forEach((c,y)=>{let $=G(y,g?h:_,f),u=C.get(c.name)?.pos;if(u===void 0)throw new Error(`Position not found for branch ${c.name}`);let b=p==="TB"||p==="BT"?u:g?u+X/2+1:u-2,B=m.append("line");B.attr("x1",0),B.attr("y1",b),B.attr("x2",R),B.attr("y2",b),B.attr("class","branch branch"+$),p==="TB"?(B.attr("y1",z),B.attr("x1",u),B.attr("y2",R),B.attr("x2",u)):p==="BT"&&(B.attr("y1",R),B.attr("x1",u),B.attr("y2",z),B.attr("x2",u)),Y.push(b);let U=c.name,A=Be(U),T=m.insert("rect"),M=m.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+$);M.node().appendChild(A);let k=A.getBBox(),ee=g?0:4,N=g?16:0,W=g?X:0;n==="neo"&&T.attr("data-look","neo"),T.attr("class","branchLabelBkg label"+$).attr("style",n==="neo"?`filter:${g?`url(#${s}-drop-shadow)`:a}`:"").attr("rx",ee).attr("ry",ee).attr("x",-k.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-k.height/2+10).attr("width",k.width+18+N).attr("height",k.height+4+W),M.attr("transform","translate("+(-k.width-14-(r.rotateCommitLabel===!0?30:0)+N/2)+", "+(b-k.height/2-2)+")"),p==="TB"?(T.attr("x",u-k.width/2-10).attr("y",0),M.attr("transform","translate("+(u-k.width/2-5)+", 0)"),g&&(T.attr("transform",`translate(${-N/2-3}, ${-W-10})`),M.attr("transform","translate("+(u-k.width/2-5)+", "+(-W*2+7)+")"))):p==="BT"?(T.attr("x",u-k.width/2-10).attr("y",R),M.attr("transform","translate("+(u-k.width/2-5)+", "+R+")"),g&&(T.attr("transform",`translate(${-N/2-3}, ${W+10})`),M.attr("transform","translate("+(u-k.width/2-5)+", "+(R+W*2+4)+")"))):T.attr("transform","translate(-19, "+(b-12-W/2)+")")})},"drawBranches"),ft=l(function(e,t,r,s,n){return C.set(e,{pos:t,index:r}),t+=50+(n?40:0)+(p==="TB"||p==="BT"?s.width/2:0),t},"setBranchPosition"),$t=l(function(e,t,r,s){Xe(),w.debug("in gitgraph renderer",e+`
|
|
14
|
+
`,"id:",t,r);let n=s.db;if(!n.getConfig){w.error("getConfig method is not available on db");return}let i=n.getConfig(),o=i.rotateCommitLabel??!1;H=n.getCommits();let a=n.getBranchesAsObjArray();p=n.getDirection();let h=he(`[id="${t}"]`),{look:g,theme:f,themeVariables:m}=q(),{useGradient:c,gradientStart:y,gradientStop:$,filterColor:u}=m;if(c){let B=h.append("defs").append("linearGradient").attr("id",t+"-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",y).attr("stop-opacity",1),B.append("stop").attr("offset","100%").attr("stop-color",$).attr("stop-opacity",1)}g==="neo"&&K.has(f??"")&&h.append("defs").append("filter").attr("id",t+"-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",u);let b=0;a.forEach((B,U)=>{let A=Be(B.name),T=h.append("g"),V=T.insert("g").attr("class","branchLabel"),M=V.insert("g").attr("class","label branch-label");M.node()?.appendChild(A);let k=A.getBBox();b=ft(B.name,b,U,k,o),M.remove(),V.remove(),T.remove()}),ye(h,H,!1,i),i.showBranches&>(h,a,i,t),mt(h,H),ye(h,H,!0,i),ge.insertTitle(h,"gitTitleText",i.titleTopMargin??0,n.getDiagramTitle()),de(void 0,h,i.diagramPadding,i.useMaxWidth)},"draw"),pt={draw:$t},Ce=8,ve=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),yt=new Set(["redux-color","redux-dark-color"]),xt=new Set(["neo","neo-dark"]),ut=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),bt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),wt=l(e=>{let{svgId:t}=e,r="";if(e.useGradient&&t)for(let s=0;s<e.THEME_COLOR_LIMIT;s++)r+=`
|
|
15
|
+
.label${s} { fill: ${e.mainBkg}; stroke: url(${t}-gradient); stroke-width: ${e.strokeWidth};}
|
|
16
|
+
`;return r},"genGitGraphGradient"),Bt=l(e=>{let t=F(),{theme:r,themeVariables:s}=t,{borderColorArray:n}=s,i=ve.has(r);if(xt.has(r)){let o="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)if(a===0)o+=`
|
|
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
|
+
${wt(e)}`;else{let h=a%Ce;o+=`
|
|
24
|
+
.branch-label${a} { fill: ${e["gitBranchLabel"+h]}; }
|
|
25
|
+
.commit${a} { stroke: ${e["git"+h]}; fill: ${e["git"+h]}; }
|
|
26
|
+
.commit-highlight${a} { stroke: ${e["gitInv"+h]}; fill: ${e["gitInv"+h]}; }
|
|
27
|
+
.arrow${a} { stroke: ${e["git"+h]}; }
|
|
28
|
+
`}return o}else if(yt.has(r)){let o="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)if(a===0)o+=`
|
|
29
|
+
.branch-label${a} { fill: ${e.nodeBorder}; ${i?`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}; ${i?`font-weight:${e.noteFontWeight}`:""} }
|
|
33
|
+
.arrow${a} { stroke: ${e.nodeBorder}; }
|
|
34
|
+
.commit-bullets { fill: ${e.nodeBorder}; }
|
|
35
|
+
`;else{let h=a%n.length;o+=`
|
|
36
|
+
.branch-label${a} { fill: ${e.nodeBorder}; ${i?`font-weight:${e.noteFontWeight}`:""} }
|
|
37
|
+
.commit${a} { stroke: ${n[h]}; fill: ${n[h]}; }
|
|
38
|
+
.commit-highlight${a} { stroke: ${n[h]}; fill: ${n[h]}; }
|
|
39
|
+
.label${a} { fill: ${ut.has(r)?e.mainBkg:n[h]}; stroke: ${n[h]}; stroke-width: ${e.strokeWidth}; }
|
|
40
|
+
.arrow${a} { stroke: ${n[h]}; }
|
|
41
|
+
`}return o}else{let o="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)o+=`
|
|
42
|
+
.branch-label${a} { fill: ${e.nodeBorder}; ${i?`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}; ${i?`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 o}},"genColor"),kt=l(e=>`${Array.from({length:e.THEME_COLOR_LIMIT},(t,r)=>r).map(t=>{let r=t%Ce;return`
|
|
50
|
+
.branch-label${t} { fill: ${e["gitBranchLabel"+r]}; }
|
|
51
|
+
.commit${t} { stroke: ${e["git"+r]}; fill: ${e["git"+r]}; }
|
|
52
|
+
.commit-highlight${t} { stroke: ${e["gitInv"+r]}; fill: ${e["gitInv"+r]}; }
|
|
53
|
+
.label${t} { fill: ${e["git"+r]}; }
|
|
54
|
+
.arrow${t} { stroke: ${e["git"+r]}; }
|
|
55
|
+
`}).join(`
|
|
56
|
+
`)}`,"normalTheme"),Ct=l(e=>{let t=F(),{theme:r}=t,s=bt.has(r);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
|
+
${s?Bt(e):kt(e)}
|
|
67
|
+
|
|
68
|
+
.branch {
|
|
69
|
+
stroke-width: ${e.strokeWidth};
|
|
70
|
+
stroke: ${e.commitLineColor??e.lineColor};
|
|
71
|
+
stroke-dasharray: ${s?"4 2":"2"};
|
|
72
|
+
}
|
|
73
|
+
.commit-label { font-size: ${e.commitLabelFontSize}; fill: ${s?e.nodeBorder:e.commitLabelColor}; ${s?`font-weight:${e.noteFontWeight};`:""}}
|
|
74
|
+
.commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${s?"transparent":e.commitLabelBackground}; opacity: ${s?"":.5}; }
|
|
75
|
+
.tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
|
|
76
|
+
.tag-label-bkg { fill: ${s?e.mainBkg:e.tagLabelBackground}; stroke: ${s?e.nodeBorder:e.tagLabelBorder}; ${s?`filter:${e.dropShadow}`:""} }
|
|
77
|
+
.tag-hole { fill: ${e.textColor}; }
|
|
78
|
+
|
|
79
|
+
.commit-merge {
|
|
80
|
+
stroke: ${s?e.mainBkg:e.primaryColor};
|
|
81
|
+
fill: ${s?e.mainBkg:e.primaryColor};
|
|
82
|
+
}
|
|
83
|
+
.commit-reverse {
|
|
84
|
+
stroke: ${s?e.mainBkg:e.primaryColor};
|
|
85
|
+
fill: ${s?e.mainBkg:e.primaryColor};
|
|
86
|
+
stroke-width: ${s?e.strokeWidth:3};
|
|
87
|
+
}
|
|
88
|
+
.commit-highlight-outer {
|
|
89
|
+
}
|
|
90
|
+
.commit-highlight-inner {
|
|
91
|
+
stroke: ${s?e.mainBkg:e.primaryColor};
|
|
92
|
+
fill: ${s?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: ${ve.has(r)?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"),vt=Ct,_t={parser:Ve,db:we,renderer:pt,styles:vt};export{_t as diagram};
|