livebook/static/assets/gitGraphDiagram-2139c8c6-D556HLLR.js
2024-01-24 15:02:24 +00:00

71 lines
36 KiB
JavaScript

import{$a as A,Fa as S,I as Kt,Ka as D,Sa as _t,Ya as Et,b as Yt,c as jt,db as wt,eb as Tt,fb as Lt,gb as Rt,h as yt,hb as Mt,ib as vt,jb as Ct,lb as at,mb as At}from"./chunk-KR7JTV7U.js";import{a as kt,b as xt,h as ut}from"./chunk-3V74GZ4F.js";var we=ut(Yt(),1),Te=ut(jt(),1),Le=ut(Kt(),1);var pt=function(){var r=function(Y,h,b,k){for(b=b||{},k=Y.length;k--;b[Y[k]]=h);return b},a=[1,3],o=[1,6],u=[1,4],n=[1,5],c=[2,5],m=[1,12],l=[5,7,13,19,21,23,24,26,28,31,36,39,46],E=[7,13,19,21,23,24,26,28,31,36,39],_=[7,12,13,19,21,23,24,26,28,31,36,39],i=[7,13,46],g=[1,42],p=[1,41],y=[7,13,29,32,34,37,46],f=[1,55],d=[1,56],x=[1,57],H=[7,13,32,34,41,46],w={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,GG:5,document:6,EOF:7,":":8,DIR:9,options:10,body:11,OPT:12,NL:13,line:14,statement:15,commitStatement:16,mergeStatement:17,cherryPickStatement:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,section:24,branchStatement:25,CHECKOUT:26,ref:27,BRANCH:28,ORDER:29,NUM:30,CHERRY_PICK:31,COMMIT_ID:32,STR:33,COMMIT_TAG:34,EMPTYSTR:35,MERGE:36,COMMIT_TYPE:37,commitType:38,COMMIT:39,commit_arg:40,COMMIT_MSG:41,NORMAL:42,REVERSE:43,HIGHLIGHT:44,ID:45,";":46,$accept:0,$end:1},terminals_:{2:"error",5:"GG",7:"EOF",8:":",9:"DIR",12:"OPT",13:"NL",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"section",26:"CHECKOUT",28:"BRANCH",29:"ORDER",30:"NUM",31:"CHERRY_PICK",32:"COMMIT_ID",33:"STR",34:"COMMIT_TAG",35:"EMPTYSTR",36:"MERGE",37:"COMMIT_TYPE",39:"COMMIT",41:"COMMIT_MSG",42:"NORMAL",43:"REVERSE",44:"HIGHLIGHT",45:"ID",46:";"},productions_:[0,[3,2],[3,3],[3,4],[3,5],[6,0],[6,2],[10,2],[10,1],[11,0],[11,2],[14,2],[14,1],[15,1],[15,1],[15,1],[15,2],[15,2],[15,1],[15,1],[15,1],[15,2],[25,2],[25,4],[18,3],[18,5],[18,5],[18,5],[18,5],[17,2],[17,4],[17,4],[17,4],[17,6],[17,6],[17,6],[17,6],[17,6],[17,6],[17,8],[17,8],[17,8],[17,8],[17,8],[17,8],[16,2],[16,3],[16,3],[16,5],[16,5],[16,3],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,3],[16,5],[16,5],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[40,0],[40,1],[38,1],[38,1],[38,1],[27,1],[27,1],[4,1],[4,1],[4,1]],performAction:function(h,b,k,s,T,t,X){var e=t.length-1;switch(T){case 2:return t[e];case 3:return t[e-1];case 4:return s.setDirection(t[e-3]),t[e-1];case 6:s.setOptions(t[e-1]),this.$=t[e];break;case 7:t[e-1]+=t[e],this.$=t[e-1];break;case 9:this.$=[];break;case 10:t[e-1].push(t[e]),this.$=t[e-1];break;case 11:this.$=t[e-1];break;case 16:this.$=t[e].trim(),s.setAccTitle(this.$);break;case 17:case 18:this.$=t[e].trim(),s.setAccDescription(this.$);break;case 19:s.addSection(t[e].substr(8)),this.$=t[e].substr(8);break;case 21:s.checkout(t[e]);break;case 22:s.branch(t[e]);break;case 23:s.branch(t[e-2],t[e]);break;case 24:s.cherryPick(t[e],"",void 0);break;case 25:s.cherryPick(t[e-2],"",t[e]);break;case 26:case 28:s.cherryPick(t[e-2],"","");break;case 27:s.cherryPick(t[e],"",t[e-2]);break;case 29:s.merge(t[e],"","","");break;case 30:s.merge(t[e-2],t[e],"","");break;case 31:s.merge(t[e-2],"",t[e],"");break;case 32:s.merge(t[e-2],"","",t[e]);break;case 33:s.merge(t[e-4],t[e],"",t[e-2]);break;case 34:s.merge(t[e-4],"",t[e],t[e-2]);break;case 35:s.merge(t[e-4],"",t[e-2],t[e]);break;case 36:s.merge(t[e-4],t[e-2],t[e],"");break;case 37:s.merge(t[e-4],t[e-2],"",t[e]);break;case 38:s.merge(t[e-4],t[e],t[e-2],"");break;case 39:s.merge(t[e-6],t[e-4],t[e-2],t[e]);break;case 40:s.merge(t[e-6],t[e],t[e-4],t[e-2]);break;case 41:s.merge(t[e-6],t[e-4],t[e],t[e-2]);break;case 42:s.merge(t[e-6],t[e-2],t[e-4],t[e]);break;case 43:s.merge(t[e-6],t[e],t[e-2],t[e-4]);break;case 44:s.merge(t[e-6],t[e-2],t[e],t[e-4]);break;case 45:s.commit(t[e]);break;case 46:s.commit("","",s.commitType.NORMAL,t[e]);break;case 47:s.commit("","",t[e],"");break;case 48:s.commit("","",t[e],t[e-2]);break;case 49:s.commit("","",t[e-2],t[e]);break;case 50:s.commit("",t[e],s.commitType.NORMAL,"");break;case 51:s.commit("",t[e-2],s.commitType.NORMAL,t[e]);break;case 52:s.commit("",t[e],s.commitType.NORMAL,t[e-2]);break;case 53:s.commit("",t[e-2],t[e],"");break;case 54:s.commit("",t[e],t[e-2],"");break;case 55:s.commit("",t[e-4],t[e-2],t[e]);break;case 56:s.commit("",t[e-4],t[e],t[e-2]);break;case 57:s.commit("",t[e-2],t[e-4],t[e]);break;case 58:s.commit("",t[e],t[e-4],t[e-2]);break;case 59:s.commit("",t[e],t[e-2],t[e-4]);break;case 60:s.commit("",t[e-2],t[e],t[e-4]);break;case 61:s.commit(t[e],"",s.commitType.NORMAL,"");break;case 62:s.commit(t[e],"",s.commitType.NORMAL,t[e-2]);break;case 63:s.commit(t[e-2],"",s.commitType.NORMAL,t[e]);break;case 64:s.commit(t[e-2],"",t[e],"");break;case 65:s.commit(t[e],"",t[e-2],"");break;case 66:s.commit(t[e],t[e-2],s.commitType.NORMAL,"");break;case 67:s.commit(t[e-2],t[e],s.commitType.NORMAL,"");break;case 68:s.commit(t[e-4],"",t[e-2],t[e]);break;case 69:s.commit(t[e-4],"",t[e],t[e-2]);break;case 70:s.commit(t[e-2],"",t[e-4],t[e]);break;case 71:s.commit(t[e],"",t[e-4],t[e-2]);break;case 72:s.commit(t[e],"",t[e-2],t[e-4]);break;case 73:s.commit(t[e-2],"",t[e],t[e-4]);break;case 74:s.commit(t[e-4],t[e],t[e-2],"");break;case 75:s.commit(t[e-4],t[e-2],t[e],"");break;case 76:s.commit(t[e-2],t[e],t[e-4],"");break;case 77:s.commit(t[e],t[e-2],t[e-4],"");break;case 78:s.commit(t[e],t[e-4],t[e-2],"");break;case 79:s.commit(t[e-2],t[e-4],t[e],"");break;case 80:s.commit(t[e-4],t[e],s.commitType.NORMAL,t[e-2]);break;case 81:s.commit(t[e-4],t[e-2],s.commitType.NORMAL,t[e]);break;case 82:s.commit(t[e-2],t[e],s.commitType.NORMAL,t[e-4]);break;case 83:s.commit(t[e],t[e-2],s.commitType.NORMAL,t[e-4]);break;case 84:s.commit(t[e],t[e-4],s.commitType.NORMAL,t[e-2]);break;case 85:s.commit(t[e-2],t[e-4],s.commitType.NORMAL,t[e]);break;case 86:s.commit(t[e-6],t[e-4],t[e-2],t[e]);break;case 87:s.commit(t[e-6],t[e-4],t[e],t[e-2]);break;case 88:s.commit(t[e-6],t[e-2],t[e-4],t[e]);break;case 89:s.commit(t[e-6],t[e],t[e-4],t[e-2]);break;case 90:s.commit(t[e-6],t[e-2],t[e],t[e-4]);break;case 91:s.commit(t[e-6],t[e],t[e-2],t[e-4]);break;case 92:s.commit(t[e-4],t[e-6],t[e-2],t[e]);break;case 93:s.commit(t[e-4],t[e-6],t[e],t[e-2]);break;case 94:s.commit(t[e-2],t[e-6],t[e-4],t[e]);break;case 95:s.commit(t[e],t[e-6],t[e-4],t[e-2]);break;case 96:s.commit(t[e-2],t[e-6],t[e],t[e-4]);break;case 97:s.commit(t[e],t[e-6],t[e-2],t[e-4]);break;case 98:s.commit(t[e],t[e-4],t[e-2],t[e-6]);break;case 99:s.commit(t[e-2],t[e-4],t[e],t[e-6]);break;case 100:s.commit(t[e],t[e-2],t[e-4],t[e-6]);break;case 101:s.commit(t[e-2],t[e],t[e-4],t[e-6]);break;case 102:s.commit(t[e-4],t[e-2],t[e],t[e-6]);break;case 103:s.commit(t[e-4],t[e],t[e-2],t[e-6]);break;case 104:s.commit(t[e-2],t[e-4],t[e-6],t[e]);break;case 105:s.commit(t[e],t[e-4],t[e-6],t[e-2]);break;case 106:s.commit(t[e-2],t[e],t[e-6],t[e-4]);break;case 107:s.commit(t[e],t[e-2],t[e-6],t[e-4]);break;case 108:s.commit(t[e-4],t[e-2],t[e-6],t[e]);break;case 109:s.commit(t[e-4],t[e],t[e-6],t[e-2]);break;case 110:this.$="";break;case 111:this.$=t[e];break;case 112:this.$=s.commitType.NORMAL;break;case 113:this.$=s.commitType.REVERSE;break;case 114:this.$=s.commitType.HIGHLIGHT;break}},table:[{3:1,4:2,5:a,7:o,13:u,46:n},{1:[3]},{3:7,4:2,5:a,7:o,13:u,46:n},{6:8,7:c,8:[1,9],9:[1,10],10:11,13:m},r(l,[2,117]),r(l,[2,118]),r(l,[2,119]),{1:[2,1]},{7:[1,13]},{6:14,7:c,10:11,13:m},{8:[1,15]},r(E,[2,9],{11:16,12:[1,17]}),r(_,[2,8]),{1:[2,2]},{7:[1,18]},{6:19,7:c,10:11,13:m},{7:[2,6],13:[1,22],14:20,15:21,16:23,17:24,18:25,19:[1,26],21:[1,27],23:[1,28],24:[1,29],25:30,26:[1,31],28:[1,35],31:[1,34],36:[1,33],39:[1,32]},r(_,[2,7]),{1:[2,3]},{7:[1,36]},r(E,[2,10]),{4:37,7:o,13:u,46:n},r(E,[2,12]),r(i,[2,13]),r(i,[2,14]),r(i,[2,15]),{20:[1,38]},{22:[1,39]},r(i,[2,18]),r(i,[2,19]),r(i,[2,20]),{27:40,33:g,45:p},r(i,[2,110],{40:43,32:[1,46],33:[1,48],34:[1,44],37:[1,45],41:[1,47]}),{27:49,33:g,45:p},{32:[1,50],34:[1,51]},{27:52,33:g,45:p},{1:[2,4]},r(E,[2,11]),r(i,[2,16]),r(i,[2,17]),r(i,[2,21]),r(y,[2,115]),r(y,[2,116]),r(i,[2,45]),{33:[1,53]},{38:54,42:f,43:d,44:x},{33:[1,58]},{33:[1,59]},r(i,[2,111]),r(i,[2,29],{32:[1,60],34:[1,62],37:[1,61]}),{33:[1,63]},{33:[1,64],35:[1,65]},r(i,[2,22],{29:[1,66]}),r(i,[2,46],{32:[1,68],37:[1,67],41:[1,69]}),r(i,[2,47],{32:[1,71],34:[1,70],41:[1,72]}),r(H,[2,112]),r(H,[2,113]),r(H,[2,114]),r(i,[2,50],{34:[1,73],37:[1,74],41:[1,75]}),r(i,[2,61],{32:[1,78],34:[1,76],37:[1,77]}),{33:[1,79]},{38:80,42:f,43:d,44:x},{33:[1,81]},r(i,[2,24],{34:[1,82]}),{32:[1,83]},{32:[1,84]},{30:[1,85]},{38:86,42:f,43:d,44:x},{33:[1,87]},{33:[1,88]},{33:[1,89]},{33:[1,90]},{33:[1,91]},{33:[1,92]},{38:93,42:f,43:d,44:x},{33:[1,94]},{33:[1,95]},{38:96,42:f,43:d,44:x},{33:[1,97]},r(i,[2,30],{34:[1,99],37:[1,98]}),r(i,[2,31],{32:[1,101],34:[1,100]}),r(i,[2,32],{32:[1,102],37:[1,103]}),{33:[1,104],35:[1,105]},{33:[1,106]},{33:[1,107]},r(i,[2,23]),r(i,[2,48],{32:[1,108],41:[1,109]}),r(i,[2,52],{37:[1,110],41:[1,111]}),r(i,[2,62],{32:[1,113],37:[1,112]}),r(i,[2,49],{32:[1,114],41:[1,115]}),r(i,[2,54],{34:[1,116],41:[1,117]}),r(i,[2,65],{32:[1,119],34:[1,118]}),r(i,[2,51],{37:[1,120],41:[1,121]}),r(i,[2,53],{34:[1,122],41:[1,123]}),r(i,[2,66],{34:[1,125],37:[1,124]}),r(i,[2,63],{32:[1,127],37:[1,126]}),r(i,[2,64],{32:[1,129],34:[1,128]}),r(i,[2,67],{34:[1,131],37:[1,130]}),{38:132,42:f,43:d,44:x},{33:[1,133]},{33:[1,134]},{33:[1,135]},{33:[1,136]},{38:137,42:f,43:d,44:x},r(i,[2,25]),r(i,[2,26]),r(i,[2,27]),r(i,[2,28]),{33:[1,138]},{33:[1,139]},{38:140,42:f,43:d,44:x},{33:[1,141]},{38:142,42:f,43:d,44:x},{33:[1,143]},{33:[1,144]},{33:[1,145]},{33:[1,146]},{33:[1,147]},{33:[1,148]},{33:[1,149]},{38:150,42:f,43:d,44:x},{33:[1,151]},{33:[1,152]},{33:[1,153]},{38:154,42:f,43:d,44:x},{33:[1,155]},{38:156,42:f,43:d,44:x},{33:[1,157]},{33:[1,158]},{33:[1,159]},{38:160,42:f,43:d,44:x},{33:[1,161]},r(i,[2,36],{34:[1,162]}),r(i,[2,37],{37:[1,163]}),r(i,[2,35],{32:[1,164]}),r(i,[2,38],{34:[1,165]}),r(i,[2,33],{37:[1,166]}),r(i,[2,34],{32:[1,167]}),r(i,[2,59],{41:[1,168]}),r(i,[2,72],{32:[1,169]}),r(i,[2,60],{41:[1,170]}),r(i,[2,83],{37:[1,171]}),r(i,[2,73],{32:[1,172]}),r(i,[2,82],{37:[1,173]}),r(i,[2,58],{41:[1,174]}),r(i,[2,71],{32:[1,175]}),r(i,[2,57],{41:[1,176]}),r(i,[2,77],{34:[1,177]}),r(i,[2,70],{32:[1,178]}),r(i,[2,76],{34:[1,179]}),r(i,[2,56],{41:[1,180]}),r(i,[2,84],{37:[1,181]}),r(i,[2,55],{41:[1,182]}),r(i,[2,78],{34:[1,183]}),r(i,[2,79],{34:[1,184]}),r(i,[2,85],{37:[1,185]}),r(i,[2,69],{32:[1,186]}),r(i,[2,80],{37:[1,187]}),r(i,[2,68],{32:[1,188]}),r(i,[2,74],{34:[1,189]}),r(i,[2,75],{34:[1,190]}),r(i,[2,81],{37:[1,191]}),{33:[1,192]},{38:193,42:f,43:d,44:x},{33:[1,194]},{33:[1,195]},{38:196,42:f,43:d,44:x},{33:[1,197]},{33:[1,198]},{33:[1,199]},{33:[1,200]},{38:201,42:f,43:d,44:x},{33:[1,202]},{38:203,42:f,43:d,44:x},{33:[1,204]},{33:[1,205]},{33:[1,206]},{33:[1,207]},{33:[1,208]},{33:[1,209]},{33:[1,210]},{38:211,42:f,43:d,44:x},{33:[1,212]},{33:[1,213]},{33:[1,214]},{38:215,42:f,43:d,44:x},{33:[1,216]},{38:217,42:f,43:d,44:x},{33:[1,218]},{33:[1,219]},{33:[1,220]},{38:221,42:f,43:d,44:x},r(i,[2,39]),r(i,[2,41]),r(i,[2,40]),r(i,[2,42]),r(i,[2,44]),r(i,[2,43]),r(i,[2,100]),r(i,[2,101]),r(i,[2,98]),r(i,[2,99]),r(i,[2,103]),r(i,[2,102]),r(i,[2,107]),r(i,[2,106]),r(i,[2,105]),r(i,[2,104]),r(i,[2,109]),r(i,[2,108]),r(i,[2,97]),r(i,[2,96]),r(i,[2,95]),r(i,[2,94]),r(i,[2,92]),r(i,[2,93]),r(i,[2,91]),r(i,[2,90]),r(i,[2,89]),r(i,[2,88]),r(i,[2,86]),r(i,[2,87])],defaultActions:{7:[2,1],13:[2,2],18:[2,3],36:[2,4]},parseError:function(h,b){if(b.recoverable)this.trace(h);else{var k=new Error(h);throw k.hash=b,k}},parse:function(h){var b=this,k=[0],s=[],T=[null],t=[],X=this.table,e="",rt=0,bt=0,Vt=2,gt=1,Dt=t.slice.call(arguments,1),M=Object.create(this.lexer),j={yy:{}};for(var ot in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ot)&&(j.yy[ot]=this.yy[ot]);M.setInput(h,j.yy),j.yy.lexer=M,j.yy.parser=this,typeof M.yylloc=="undefined"&&(M.yylloc={});var lt=M.yylloc;t.push(lt);var zt=M.options&&M.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function qt(){var q;return q=s.pop()||M.lex()||gt,typeof q!="number"&&(q instanceof Array&&(s=q,q=s.pop()),q=b.symbols_[q]||q),q}for(var G,K,V,ht,W={},it,z,dt,st;;){if(K=k[k.length-1],this.defaultActions[K]?V=this.defaultActions[K]:((G===null||typeof G=="undefined")&&(G=qt()),V=X[K]&&X[K][G]),typeof V=="undefined"||!V.length||!V[0]){var mt="";st=[];for(it in X[K])this.terminals_[it]&&it>Vt&&st.push("'"+this.terminals_[it]+"'");M.showPosition?mt="Parse error on line "+(rt+1)+`:
`+M.showPosition()+`
Expecting `+st.join(", ")+", got '"+(this.terminals_[G]||G)+"'":mt="Parse error on line "+(rt+1)+": Unexpected "+(G==gt?"end of input":"'"+(this.terminals_[G]||G)+"'"),this.parseError(mt,{text:M.match,token:this.terminals_[G]||G,line:M.yylineno,loc:lt,expected:st})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+G);switch(V[0]){case 1:k.push(G),T.push(M.yytext),t.push(M.yylloc),k.push(V[1]),G=null,bt=M.yyleng,e=M.yytext,rt=M.yylineno,lt=M.yylloc;break;case 2:if(z=this.productions_[V[1]][1],W.$=T[T.length-z],W._$={first_line:t[t.length-(z||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(z||1)].first_column,last_column:t[t.length-1].last_column},zt&&(W._$.range=[t[t.length-(z||1)].range[0],t[t.length-1].range[1]]),ht=this.performAction.apply(W,[e,bt,rt,j.yy,V[1],T,t].concat(Dt)),typeof ht!="undefined")return ht;z&&(k=k.slice(0,-1*z*2),T=T.slice(0,-1*z),t=t.slice(0,-1*z)),k.push(this.productions_[V[1]][0]),T.push(W.$),t.push(W._$),dt=X[k[k.length-2]][k[k.length-1]],k.push(dt);break;case 3:return!0}}return!0}},B=function(){var Y={EOF:1,parseError:function(b,k){if(this.yy.parser)this.yy.parser.parseError(b,k);else throw new Error(b)},setInput:function(h,b){return this.yy=b||this.yy||{},this._input=h,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},input:function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var b=h.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},unput:function(h){var b=h.length,k=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var s=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),k.length-1&&(this.yylineno-=k.length-1);var T=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:k?(k.length===s.length?this.yylloc.first_column:0)+s[s.length-k.length].length-k[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject: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).
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(h){this.unput(this.match.slice(h))},pastInput:function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var h=this.pastInput(),b=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
`+b+"^"},test_match:function(h,b){var k,s,T;if(this.options.backtrack_lexer&&(T={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&&(T.yylloc.range=this.yylloc.range.slice(0))),s=h[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,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(h[0].length),this.matched+=h[0],k=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),k)return k;if(this._backtrack){for(var t in T)this[t]=T[t];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,b,k,s;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),t=0;t<T.length;t++)if(k=this._input.match(this.rules[T[t]]),k&&(!b||k[0].length>b[0].length)){if(b=k,s=t,this.options.backtrack_lexer){if(h=this.test_match(k,T[t]),h!==!1)return h;if(this._backtrack){b=!1;continue}else return!1}else if(!this.options.flex)break}return b?(h=this.test_match(b,T[s]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var b=this.next();return b||this.lex()},begin:function(b){this.conditionStack.push(b)},popState:function(){var b=this.conditionStack.length-1;return b>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(b){return b=this.conditionStack.length-1-Math.abs(b||0),b>=0?this.conditionStack[b]:"INITIAL"},pushState:function(b){this.begin(b)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(b,k,s,T){switch(s){case 0:return this.begin("acc_title"),19;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),21;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 13;case 8:break;case 9:break;case 10:return 5;case 11:return 39;case 12:return 32;case 13:return 37;case 14:return 41;case 15:return 42;case 16:return 43;case 17:return 44;case 18:return 34;case 19:return 28;case 20:return 29;case 21:return 36;case 22:return 31;case 23:return 26;case 24:return 9;case 25:return 9;case 26:return 8;case 27:return"CARET";case 28:this.begin("options");break;case 29:this.popState();break;case 30:return 12;case 31:return 35;case 32:this.begin("string");break;case 33:this.popState();break;case 34:return 33;case 35:return 30;case 36:return 45;case 37:return 7}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:TB\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},options:{rules:[29,30],inclusive:!1},string:{rules:[33,34],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,31,32,35,36,37,38],inclusive:!0}}};return Y}();w.lexer=B;function P(){this.yy={}}return P.prototype=w,w.Parser=P,new P}();pt.parser=pt;var Ft=pt,nt=A().gitGraph.mainBranchName,Ut=A().gitGraph.mainBranchOrder,R={},I=null,Z={};Z[nt]={name:nt,order:Ut};var L={};L[nt]=I;var C=nt,It="LR",U=0;function ft(){return _t({length:7})}function Wt(r,a){let o=Object.create(null);return r.reduce((u,n)=>{let c=a(n);return o[c]||(o[c]=!0,u.push(n)),u},[])}var Xt=function(r){It=r},Gt={},Jt=function(r){S.debug("options str",r),r=r&&r.trim(),r=r||"{}";try{Gt=JSON.parse(r)}catch(a){S.error("error while parsing gitGraph options",a.message)}},Qt=function(){return Gt},Zt=function(r,a,o,u){S.debug("Entering commit:",r,a,o,u),a=D.sanitizeText(a,A()),r=D.sanitizeText(r,A()),u=D.sanitizeText(u,A());let n={id:a||U+"-"+ft(),message:r,seq:U++,type:o||$.NORMAL,tag:u||"",parents:I==null?[]:[I.id],branch:C};I=n,R[n.id]=n,L[C]=n.id,S.debug("in pushCommit "+n.id)},$t=function(r,a){if(r=D.sanitizeText(r,A()),L[r]===void 0)L[r]=I!=null?I.id:null,Z[r]={name:r,order:a?parseInt(a,10):null},Pt(r),S.debug("in createBranch");else{let o=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+'")');throw o.hash={text:"branch "+r,token:"branch "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+r+'"']},o}},te=function(r,a,o,u){r=D.sanitizeText(r,A()),a=D.sanitizeText(a,A());let n=R[L[C]],c=R[L[r]];if(C===r){let l=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw l.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},l}else if(n===void 0||!n){let l=new Error('Incorrect usage of "merge". Current branch ('+C+")has no commits");throw l.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},l}else if(L[r]===void 0){let l=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw l.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+r]},l}else if(c===void 0||!c){let l=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw l.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},l}else if(n===c){let l=new Error('Incorrect usage of "merge". Both branches have same head');throw l.hash={text:"merge "+r,token:"merge "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},l}else if(a&&R[a]!==void 0){let l=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom Id");throw l.hash={text:"merge "+r+a+o+u,token:"merge "+r+a+o+u,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+r+" "+a+"_UNIQUE "+o+" "+u]},l}let m={id:a||U+"-"+ft(),message:"merged branch "+r+" into "+C,seq:U++,parents:[I==null?null:I.id,L[r]],branch:C,type:$.MERGE,customType:o,customId:!!a,tag:u||""};I=m,R[m.id]=m,L[C]=m.id,S.debug(L),S.debug("in mergeBranch")},ee=function(r,a,o){if(S.debug("Entering cherryPick:",r,a,o),r=D.sanitizeText(r,A()),a=D.sanitizeText(a,A()),o=D.sanitizeText(o,A()),!r||R[r]===void 0){let c=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw c.hash={text:"cherryPick "+r+" "+a,token:"cherryPick "+r+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},c}let u=R[r],n=u.branch;if(u.type===$.MERGE){let c=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw c.hash={text:"cherryPick "+r+" "+a,token:"cherryPick "+r+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},c}if(!a||R[a]===void 0){if(n===C){let l=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw l.hash={text:"cherryPick "+r+" "+a,token:"cherryPick "+r+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},l}let c=R[L[C]];if(c===void 0||!c){let l=new Error('Incorrect usage of "cherry-pick". Current branch ('+C+")has no commits");throw l.hash={text:"cherryPick "+r+" "+a,token:"cherryPick "+r+" "+a,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},l}let m={id:U+"-"+ft(),message:"cherry-picked "+u+" into "+C,seq:U++,parents:[I==null?null:I.id,u.id],branch:C,type:$.CHERRY_PICK,tag:o!=null?o:"cherry-pick:"+u.id};I=m,R[m.id]=m,L[C]=m.id,S.debug(L),S.debug("in cherryPick")}},Pt=function(r){if(r=D.sanitizeText(r,A()),L[r]===void 0){let a=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+r+'")');throw a.hash={text:"checkout "+r,token:"checkout "+r,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+r+'"']},a}else{C=r;let a=L[C];I=R[a]}};function Ot(r,a,o){let u=r.indexOf(a);u===-1?r.push(o):r.splice(u,1,o)}function Nt(r){let a=r.reduce((n,c)=>n.seq>c.seq?n:c,r[0]),o="";r.forEach(function(n){n===a?o+=" *":o+=" |"});let u=[o,a.id,a.seq];for(let n in L)L[n]===a.id&&u.push(n);if(S.debug(u.join(" ")),a.parents&&a.parents.length==2){let n=R[a.parents[0]];Ot(r,a,n),r.push(R[a.parents[1]])}else{if(a.parents.length==0)return;{let n=R[a.parents];Ot(r,a,n)}}r=Wt(r,n=>n.id),Nt(r)}var re=function(){S.debug(R);let r=Ht()[0];Nt([r])},ie=function(){R={},I=null;let r=A().gitGraph.mainBranchName,a=A().gitGraph.mainBranchOrder;L={},L[r]=null,Z={},Z[r]={name:r,order:a},C=r,U=0,wt()},se=function(){return Object.values(Z).map((a,o)=>a.order!==null?a:xt(kt({},a),{order:parseFloat(`0.${o}`,10)})).sort((a,o)=>a.order-o.order).map(({name:a})=>({name:a}))},ae=function(){return L},ne=function(){return R},Ht=function(){let r=Object.keys(R).map(function(a){return R[a]});return r.forEach(function(a){S.debug(a.id)}),r.sort((a,o)=>a.seq-o.seq),r},ce=function(){return C},oe=function(){return It},le=function(){return I},$={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},he={getConfig:()=>A().gitGraph,setDirection:Xt,setOptions:Jt,getOptions:Qt,commit:Zt,branch:$t,merge:te,cherryPick:ee,checkout:Pt,prettyPrint:re,clear:ie,getBranchesAsObjArray:se,getBranches:ae,getCommits:ne,getCommitsArray:Ht,getCurrentBranch:ce,getDirection:oe,getHead:le,setAccTitle:Tt,getAccTitle:Lt,getAccDescription:Mt,setAccDescription:Rt,setDiagramTitle:vt,getDiagramTitle:Ct,commitType:$},J={},N={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},F=8,v={},tt={},ct=[],et=0,O="LR",me=()=>{v={},tt={},J={},et=0,ct=[],O="LR"},Bt=r=>{let a=document.createElementNS("http://www.w3.org/2000/svg","text"),o=[];typeof r=="string"?o=r.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(r)?o=r:o=[];for(let u of o){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=u.trim(),a.appendChild(n)}return a},St=(r,a,o)=>{let u=at().gitGraph,n=r.append("g").attr("class","commit-bullets"),c=r.append("g").attr("class","commit-labels"),m=0;O==="TB"&&(m=30),Object.keys(a).sort((_,i)=>a[_].seq-a[i].seq).forEach(_=>{let i=a[_],g=O==="TB"?m+10:v[i.branch].pos,p=O==="TB"?v[i.branch].pos:m+10;if(o){let y,f=i.customType!==void 0&&i.customType!==""?i.customType:i.type;switch(f){case N.NORMAL:y="commit-normal";break;case N.REVERSE:y="commit-reverse";break;case N.HIGHLIGHT:y="commit-highlight";break;case N.MERGE:y="commit-merge";break;case N.CHERRY_PICK:y="commit-cherry-pick";break;default:y="commit-normal"}if(f===N.HIGHLIGHT){let d=n.append("rect");d.attr("x",p-10),d.attr("y",g-10),d.attr("height",20),d.attr("width",20),d.attr("class",`commit ${i.id} commit-highlight${v[i.branch].index%F} ${y}-outer`),n.append("rect").attr("x",p-6).attr("y",g-6).attr("height",12).attr("width",12).attr("class",`commit ${i.id} commit${v[i.branch].index%F} ${y}-inner`)}else if(f===N.CHERRY_PICK)n.append("circle").attr("cx",p).attr("cy",g).attr("r",10).attr("class",`commit ${i.id} ${y}`),n.append("circle").attr("cx",p-3).attr("cy",g+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${i.id} ${y}`),n.append("circle").attr("cx",p+3).attr("cy",g+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${i.id} ${y}`),n.append("line").attr("x1",p+3).attr("y1",g+1).attr("x2",p).attr("y2",g-5).attr("stroke","#fff").attr("class",`commit ${i.id} ${y}`),n.append("line").attr("x1",p-3).attr("y1",g+1).attr("x2",p).attr("y2",g-5).attr("stroke","#fff").attr("class",`commit ${i.id} ${y}`);else{let d=n.append("circle");if(d.attr("cx",p),d.attr("cy",g),d.attr("r",i.type===N.MERGE?9:10),d.attr("class",`commit ${i.id} commit${v[i.branch].index%F}`),f===N.MERGE){let x=n.append("circle");x.attr("cx",p),x.attr("cy",g),x.attr("r",6),x.attr("class",`commit ${y} ${i.id} commit${v[i.branch].index%F}`)}f===N.REVERSE&&n.append("path").attr("d",`M ${p-5},${g-5}L${p+5},${g+5}M${p-5},${g+5}L${p+5},${g-5}`).attr("class",`commit ${y} ${i.id} commit${v[i.branch].index%F}`)}}if(O==="TB"?tt[i.id]={x:p,y:m+10}:tt[i.id]={x:m+10,y:g},o){if(i.type!==N.CHERRY_PICK&&(i.customId&&i.type===N.MERGE||i.type!==N.MERGE)&&u.showCommitLabel){let d=c.append("g"),x=d.insert("rect").attr("class","commit-label-bkg"),H=d.append("text").attr("x",m).attr("y",g+25).attr("class","commit-label").text(i.id),w=H.node().getBBox();if(x.attr("x",m+10-w.width/2-2).attr("y",g+13.5).attr("width",w.width+2*2).attr("height",w.height+2*2),O==="TB"&&(x.attr("x",p-(w.width+4*4+5)).attr("y",g-12),H.attr("x",p-(w.width+4*4)).attr("y",g+w.height-12)),O!=="TB"&&H.attr("x",m+10-w.width/2),u.rotateCommitLabel)if(O==="TB")H.attr("transform","rotate(-45, "+p+", "+g+")"),x.attr("transform","rotate(-45, "+p+", "+g+")");else{let B=-7.5-(w.width+10)/25*9.5,P=10+w.width/25*8.5;d.attr("transform","translate("+B+", "+P+") rotate(-45, "+m+", "+g+")")}}if(i.tag){let d=c.insert("polygon"),x=c.append("circle"),H=c.append("text").attr("y",g-16).attr("class","tag-label").text(i.tag),w=H.node().getBBox();H.attr("x",m+10-w.width/2);let B=w.height/2,P=g-19.2;d.attr("class","tag-label-bkg").attr("points",`
${m-w.width/2-4/2},${P+2}
${m-w.width/2-4/2},${P-2}
${m+10-w.width/2-4},${P-B-2}
${m+10+w.width/2+4},${P-B-2}
${m+10+w.width/2+4},${P+B+2}
${m+10-w.width/2-4},${P+B+2}`),x.attr("cx",m-w.width/2+4/2).attr("cy",P).attr("r",1.5).attr("class","tag-hole"),O==="TB"&&(d.attr("class","tag-label-bkg").attr("points",`
${p},${m+2}
${p},${m-2}
${p+10},${m-B-2}
${p+10+w.width+4},${m-B-2}
${p+10+w.width+4},${m+B+2}
${p+10},${m+B+2}`).attr("transform","translate(12,12) rotate(45, "+p+","+m+")"),x.attr("cx",p+4/2).attr("cy",m).attr("transform","translate(12,12) rotate(45, "+p+","+m+")"),H.attr("x",p+5).attr("y",m+3).attr("transform","translate(14,14) rotate(45, "+p+","+m+")"))}}m+=50,m>et&&(et=m)})},ue=(r,a,o)=>Object.keys(o).filter(c=>o[c].branch===a.branch&&o[c].seq>r.seq&&o[c].seq<a.seq).length>0,Q=(r,a,o=0)=>{let u=r+Math.abs(r-a)/2;if(o>5)return u;if(ct.every(m=>Math.abs(m-u)>=10))return ct.push(u),u;let c=Math.abs(r-a);return Q(r,a-c/5,o+1)},pe=(r,a,o,u)=>{let n=tt[a.id],c=tt[o.id],m=ue(a,o,u),l="",E="",_=0,i=0,g=v[o.branch].index,p;if(m){l="A 10 10, 0, 0, 0,",E="A 10 10, 0, 0, 1,",_=10,i=10,g=v[o.branch].index;let y=n.y<c.y?Q(n.y,c.y):Q(c.y,n.y),f=n.x<c.x?Q(n.x,c.x):Q(c.x,n.x);O==="TB"?n.x<c.x?p=`M ${n.x} ${n.y} L ${f-_} ${n.y} ${E} ${f} ${n.y+i} L ${f} ${c.y-_} ${l} ${f+i} ${c.y} L ${c.x} ${c.y}`:p=`M ${n.x} ${n.y} L ${f+_} ${n.y} ${l} ${f} ${n.y+i} L ${f} ${c.y-_} ${E} ${f-i} ${c.y} L ${c.x} ${c.y}`:n.y<c.y?p=`M ${n.x} ${n.y} L ${n.x} ${y-_} ${l} ${n.x+i} ${y} L ${c.x-_} ${y} ${E} ${c.x} ${y+i} L ${c.x} ${c.y}`:p=`M ${n.x} ${n.y} L ${n.x} ${y+_} ${E} ${n.x+i} ${y} L ${c.x-_} ${y} ${l} ${c.x} ${y-i} L ${c.x} ${c.y}`}else O==="TB"?(n.x<c.x&&(l="A 20 20, 0, 0, 0,",E="A 20 20, 0, 0, 1,",_=20,i=20,g=v[o.branch].index,p=`M ${n.x} ${n.y} L ${c.x-_} ${n.y} ${E} ${c.x} ${n.y+i} L ${c.x} ${c.y}`),n.x>c.x&&(l="A 20 20, 0, 0, 0,",E="A 20 20, 0, 0, 1,",_=20,i=20,g=v[a.branch].index,p=`M ${n.x} ${n.y} L ${n.x} ${c.y-_} ${E} ${n.x-i} ${c.y} L ${c.x} ${c.y}`),n.x===c.x&&(g=v[a.branch].index,p=`M ${n.x} ${n.y} L ${n.x+_} ${n.y} ${l} ${n.x+i} ${c.y+_} L ${c.x} ${c.y}`)):(n.y<c.y&&(l="A 20 20, 0, 0, 0,",_=20,i=20,g=v[o.branch].index,p=`M ${n.x} ${n.y} L ${n.x} ${c.y-_} ${l} ${n.x+i} ${c.y} L ${c.x} ${c.y}`),n.y>c.y&&(l="A 20 20, 0, 0, 0,",_=20,i=20,g=v[a.branch].index,p=`M ${n.x} ${n.y} L ${c.x-_} ${n.y} ${l} ${c.x} ${n.y-i} L ${c.x} ${c.y}`),n.y===c.y&&(g=v[a.branch].index,p=`M ${n.x} ${n.y} L ${n.x} ${c.y-_} ${l} ${n.x+i} ${c.y} L ${c.x} ${c.y}`));r.append("path").attr("d",p).attr("class","arrow arrow"+g%F)},fe=(r,a)=>{let o=r.append("g").attr("class","commit-arrows");Object.keys(a).forEach(u=>{let n=a[u];n.parents&&n.parents.length>0&&n.parents.forEach(c=>{pe(o,a[c],n,a)})})},be=(r,a)=>{let o=at().gitGraph,u=r.append("g");a.forEach((n,c)=>{let m=c%F,l=v[n.name].pos,E=u.append("line");E.attr("x1",0),E.attr("y1",l),E.attr("x2",et),E.attr("y2",l),E.attr("class","branch branch"+m),O==="TB"&&(E.attr("y1",30),E.attr("x1",l),E.attr("y2",et),E.attr("x2",l)),ct.push(l);let _=n.name,i=Bt(_),g=u.insert("rect"),y=u.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+m);y.node().appendChild(i);let f=i.getBBox();g.attr("class","branchLabelBkg label"+m).attr("rx",4).attr("ry",4).attr("x",-f.width-4-(o.rotateCommitLabel===!0?30:0)).attr("y",-f.height/2+8).attr("width",f.width+18).attr("height",f.height+4),y.attr("transform","translate("+(-f.width-14-(o.rotateCommitLabel===!0?30:0))+", "+(l-f.height/2-1)+")"),O==="TB"&&(g.attr("x",l-f.width/2-10).attr("y",0),y.attr("transform","translate("+(l-f.width/2-5)+", 0)")),O!=="TB"&&g.attr("transform","translate(-19, "+(l-f.height/2)+")")})},ge=function(r,a,o,u){var _;me();let n=at(),c=n.gitGraph;S.debug("in gitgraph renderer",r+`
`,"id:",a,o),J=u.db.getCommits();let m=u.db.getBranchesAsObjArray();O=u.db.getDirection();let l=yt(`[id="${a}"]`),E=0;m.forEach((i,g)=>{let p=Bt(i.name),y=l.append("g"),f=y.insert("g").attr("class","branchLabel"),d=f.insert("g").attr("class","label branch-label");d.node().appendChild(p);let x=p.getBBox();v[i.name]={pos:E,index:g},E+=50+(c.rotateCommitLabel?40:0)+(O==="TB"?x.width/2:0),d.remove(),f.remove(),y.remove()}),St(l,J,!1),c.showBranches&&be(l,m),fe(l,J),St(l,J,!0),Et.insertTitle(l,"gitTitleText",c.titleTopMargin,u.db.getDiagramTitle()),At(void 0,l,c.diagramPadding,(_=c.useMaxWidth)!=null?_:n.useMaxWidth)},de={draw:ge},ke=r=>`
.commit-id,
.commit-msg,
.branch-label {
fill: lightgrey;
color: lightgrey;
font-family: 'trebuchet ms', verdana, arial, sans-serif;
font-family: var(--mermaid-font-family);
}
${[0,1,2,3,4,5,6,7].map(a=>`
.branch-label${a} { fill: ${r["gitBranchLabel"+a]}; }
.commit${a} { stroke: ${r["git"+a]}; fill: ${r["git"+a]}; }
.commit-highlight${a} { stroke: ${r["gitInv"+a]}; fill: ${r["gitInv"+a]}; }
.label${a} { fill: ${r["git"+a]}; }
.arrow${a} { stroke: ${r["git"+a]}; }
`).join(`
`)}
.branch {
stroke-width: 1;
stroke: ${r.lineColor};
stroke-dasharray: 2;
}
.commit-label { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelColor};}
.commit-label-bkg { font-size: ${r.commitLabelFontSize}; fill: ${r.commitLabelBackground}; opacity: 0.5; }
.tag-label { font-size: ${r.tagLabelFontSize}; fill: ${r.tagLabelColor};}
.tag-label-bkg { fill: ${r.tagLabelBackground}; stroke: ${r.tagLabelBorder}; }
.tag-hole { fill: ${r.textColor}; }
.commit-merge {
stroke: ${r.primaryColor};
fill: ${r.primaryColor};
}
.commit-reverse {
stroke: ${r.primaryColor};
fill: ${r.primaryColor};
stroke-width: 3;
}
.commit-highlight-outer {
}
.commit-highlight-inner {
stroke: ${r.primaryColor};
fill: ${r.primaryColor};
}
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
.gitTitleText {
text-anchor: middle;
font-size: 18px;
fill: ${r.textColor};
}
`,xe=ke,Re={parser:Ft,db:he,renderer:de,styles:xe};export{Re as diagram};