nodered_cfg/node_modules/@flowfuse/node-red-dashboard/dist/assets/gitGraphDiagram-e0ffc2d1-CGZsAiT6.js

71 lines
38 KiB
JavaScript
Raw Normal View History

2024-08-24 20:48:14 +02:00
import{c as I,s as Oe,g as Ie,a as Ge,b as Pe,D as Ne,E as He,m as De,l as N,j as V,F as Be,I as fe,h as Ve,A as ze,J as je,K as qe}from"./index-BPCszWWQ.js";var pe=function(){var r=function(q,m,b,k){for(b=b||{},k=q.length;k--;b[q[k]]=m);return b},a=[1,4],o=[1,7],p=[1,5],n=[1,9],c=[1,6],u=[2,6],h=[1,16],v=[6,8,14,20,22,24,25,27,29,32,37,40,50,55],x=[8,14,20,22,24,25,27,29,32,37,40],l=[8,13,14,20,22,24,25,27,29,32,37,40],g=[1,26],f=[6,8,14,50,55],s=[8,14,55],_=[1,53],w=[1,52],O=[8,14,30,33,35,38,55],E=[1,67],d=[1,68],y=[1,69],H=[8,14,33,35,42,55],ce={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ref:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,ID:54,";":55,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:"ID",55:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[28,1],[28,1],[4,1],[4,1],[4,1]],performAction:function(m,b,k,i,T,e,W){var t=e.length-1;switch(T){case 3:return e[t];case 4:return e[t-1];case 5:return i.setDirection(e[t-3]),e[t-1];case 7:i.setOptions(e[t-1]),this.$=e[t];break;case 8:e[t-1]+=e[t],this.$=e[t-1];break;case 10:this.$=[];break;case 11:e[t-1].push(e[t]),this.$=e[t-1];break;case 12:this.$=e[t-1];break;case 17:this.$=e[t].trim(),i.setAccTitle(this.$);break;case 18:case 19:this.$=e[t].trim(),i.setAccDescription(this.$);break;case 20:i.addSection(e[t].substr(8)),this.$=e[t].substr(8);break;case 22:i.checkout(e[t]);break;case 23:i.branch(e[t]);break;case 24:i.branch(e[t-2],e[t]);break;case 25:i.cherryPick(e[t],"",void 0);break;case 26:i.cherryPick(e[t-2],"",e[t]);break;case 27:case 29:i.cherryPick(e[t-2],"","");break;case 28:i.cherryPick(e[t],"",e[t-2]);break;case 30:i.merge(e[t],"","","");break;case 31:i.merge(e[t-2],e[t],"","");break;case 32:i.merge(e[t-2],"",e[t],"");break;case 33:i.merge(e[t-2],"","",e[t]);break;case 34:i.merge(e[t-4],e[t],"",e[t-2]);break;case 35:i.merge(e[t-4],"",e[t],e[t-2]);break;case 36:i.merge(e[t-4],"",e[t-2],e[t]);break;case 37:i.merge(e[t-4],e[t-2],e[t],"");break;case 38:i.merge(e[t-4],e[t-2],"",e[t]);break;case 39:i.merge(e[t-4],e[t],e[t-2],"");break;case 40:i.merge(e[t-6],e[t-4],e[t-2],e[t]);break;case 41:i.merge(e[t-6],e[t],e[t-4],e[t-2]);break;case 42:i.merge(e[t-6],e[t-4],e[t],e[t-2]);break;case 43:i.merge(e[t-6],e[t-2],e[t-4],e[t]);break;case 44:i
`+M.showPosition()+`
Expecting `+se.join(", ")+", got '"+(this.terminals_[P]||P)+"'":ue="Parse error on line "+(re+1)+": Unexpected "+(P==de?"end of input":"'"+(this.terminals_[P]||P)+"'"),this.parseError(ue,{text:M.match,token:this.terminals_[P]||P,line:M.yylineno,loc:he,expected:se})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+P);switch(B[0]){case 1:k.push(P),T.push(M.yytext),e.push(M.yylloc),k.push(B[1]),P=null,ge=M.yyleng,t=M.yytext,re=M.yylineno,he=M.yylloc;break;case 2:if(z=this.productions_[B[1]][1],J.$=T[T.length-z],J._$={first_line:e[e.length-(z||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(z||1)].first_column,last_column:e[e.length-1].last_column},Ae&&(J._$.range=[e[e.length-(z||1)].range[0],e[e.length-1].range[1]]),me=this.performAction.apply(J,[t,ge,re,Y.yy,B[1],T,e].concat(Ce)),typeof me<"u")return me;z&&(k=k.slice(0,-1*z*2),T=T.slice(0,-1*z),e=e.slice(0,-1*z)),k.push(this.productions_[B[1]][0]),T.push(J.$),e.push(J._$),ke=W[k[k.length-2]][k[k.length-1]],k.push(ke);break;case 3:return!0}}return!0}},Re=function(){var q={EOF:1,parseError:function(b,k){if(this.yy.parser)this.yy.parser.parseError(b,k);else throw new Error(b)},setInput:function(m,b){return this.yy=b||this.yy||{},this._input=m,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 m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var b=m.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),m},unput:function(m){var b=m.length,k=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),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===i.length?this.yylloc.first_column:0)+i[i.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(m){this.unput(this.match.slice(m))},pastInput:function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var m=this.pastInput(),b=new Array(m.length+1).join("-");return m+this.upcomingInput()+`
`+b+"^"},test_match:function(m,b){var k,i,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))),i=m[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,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(m[0].length),this.matched+=m[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 e in T)this[e]=T[e];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,b,k,i;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),e=0;e<T.length;e++)if(k=this._input.match(this.rules[T[e]]),k&&(!b||k[0].length>b[0].length)){if(b=k,i=e,this.options.backtrack_lexer){if(m=this.test_match(k,T[e]),m!==!1)return m;if(this._backtrack){b=!1;continue}else return!1}else if(!this.options.flex)break}return b?(m=this.test_match(b,T[i]),m!==!1?m:!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,i,T){switch(i){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:break;case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:return 10;case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 34:this.popState();break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 38:this.popState();break;case 39:return 34;case 40:return 31;case 41:return 54;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?: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:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}};return q}();ce.lexer=Re;function oe(){this.yy={}}return oe.prototype=ce,ce.Parser=oe,new oe}();pe.parser=pe;const Ye=pe;let ae=I().gitGraph.mainBranchName,Ke=I().gitGraph.mainBranchOrder,R={},G=null,Z={};Z[ae]={name:ae,order:Ke};let L={};L[ae]=G;let A=ae,ye="LR",U=0;function be(){return qe({length:7})}const Fe=function(r,a,o){De.parseDirective(this,r,a,o)};function Ue(r,a){const o=Object.create(null);return r.reduce((p,n)=>{const c=a(n);return o[c]||(o[c]=!0,p.push(n)),p},[])}const Je=function(r){ye=r};let Ee={};const We=function(r){N.debug("options str",r),r=r&&r.trim(),r=r||"{}";try{Ee=JSON.parse(r)}catch(a){N.error("error while parsing gitGraph options",a.message)}},Xe=function(){return Ee},Qe=function(r,a,o,p){N.debug("Entering commit:",r,a,o,p),a=V.sanitizeText(a,I()),r=V.sanitizeText(r,I()),p=V.sanitizeText(p,I());const n={id:a||U+"-"+be(),message:r,seq:U++,type:o|
${u-d.width/2-4/2},${H+2}
${u-d.width/2-4/2},${H-2}
${u+10-d.width/2-4},${H-y-2}
${u+10+d.width/2+4},${H-y-2}
${u+10+d.width/2+4},${H+y+2}
${u+10-d.width/2-4},${H+y+2}`),O.attr("cx",u-d.width/2+4/2).attr("cy",H).attr("r",1.5).attr("class","tag-hole"),S==="TB"&&(w.attr("class","tag-label-bkg").attr("points",`
${f},${u+2}
${f},${u-2}
${f+10},${u-y-2}
${f+10+d.width+4},${u-y-2}
${f+10+d.width+4},${u+y+2}
${f+10},${u+y+2}`).attr("transform","translate(12,12) rotate(45, "+f+","+u+")"),O.attr("cx",f+4/2).attr("cy",u).attr("transform","translate(12,12) rotate(45, "+f+","+u+")"),E.attr("x",f+5).attr("y",u+3).attr("transform","translate(14,14) rotate(45, "+f+","+u+")"))}}u+=50,u>te&&(te=u)})},mt=(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)=>{const p=r+Math.abs(r-a)/2;if(o>5)return p;if(ne.every(u=>Math.abs(u-p)>=10))return ne.push(p),p;const c=Math.abs(r-a);return Q(r,a-c/5,o+1)},ut=(r,a,o,p)=>{const n=ee[a.id],c=ee[o.id],u=mt(a,o,p);let h="",v="",x=0,l=0,g=C[o.branch].index,f;if(u){h="A 10 10, 0, 0, 0,",v="A 10 10, 0, 0, 1,",x=10,l=10,g=C[o.branch].index;const s=n.y<c.y?Q(n.y,c.y):Q(c.y,n.y),_=n.x<c.x?Q(n.x,c.x):Q(c.x,n.x);S==="TB"?n.x<c.x?f=`M ${n.x} ${n.y} L ${_-x} ${n.y} ${v} ${_} ${n.y+l} L ${_} ${c.y-x} ${h} ${_+l} ${c.y} L ${c.x} ${c.y}`:f=`M ${n.x} ${n.y} L ${_+x} ${n.y} ${h} ${_} ${n.y+l} L ${_} ${c.y-x} ${v} ${_-l} ${c.y} L ${c.x} ${c.y}`:n.y<c.y?f=`M ${n.x} ${n.y} L ${n.x} ${s-x} ${h} ${n.x+l} ${s} L ${c.x-x} ${s} ${v} ${c.x} ${s+l} L ${c.x} ${c.y}`:f=`M ${n.x} ${n.y} L ${n.x} ${s+x} ${v} ${n.x+l} ${s} L ${c.x-x} ${s} ${h} ${c.x} ${s-l} L ${c.x} ${c.y}`}else S==="TB"?(n.x<c.x&&(h="A 20 20, 0, 0, 0,",v="A 20 20, 0, 0, 1,",x=20,l=20,g=C[o.branch].index,f=`M ${n.x} ${n.y} L ${c.x-x} ${n.y} ${v} ${c.x} ${n.y+l} L ${c.x} ${c.y}`),n.x>c.x&&(h="A 20 20, 0, 0, 0,",v="A 20 20, 0, 0, 1,",x=20,l=20,g=C[a.branch].index,f=`M ${n.x} ${n.y} L ${n.x} ${c.y-x} ${v} ${n.x-l} ${c.y} L ${c.x} ${c.y}`),n.x===c.x&&(g=C[a.branch].index,f=`M ${n.x} ${n.y} L ${n.x+x} ${n.y} ${h} ${n.x+l} ${c.y+x} L ${c.x} ${c.y}`)):(n.y<c.y&&(h="A 20 20, 0, 0, 0,",x=20,l=20,g=C[o.branch].index,f=`M ${n.x} ${n.y} L ${n.x} ${c.y-x} ${h} ${n.x+l} ${c.y} L ${c.x} ${c.y}`),n.y>c.y&&(h="A 20 20, 0, 0, 0,",x=20,l=20,g=C[a.branch].index,f=`M ${n.x} ${n.y} L ${c.x-x} ${n.y} ${h} ${c.x} ${n.y-l} L ${c.x} ${c.y}`),n.y===c.y&&(g=C[a.branch].index,f=`M ${n.x} ${n.y} L ${n.x} ${c.y-x} ${h} ${n.x+l} ${c.y} L ${c.x} ${c.y}`));r.append("path").attr("d",f).attr("class","arrow arrow"+g%F)},pt=(r,a)=>{const o=r.append("g").attr("class","commit-arrows");Object.keys(a).forEach(p=>{const n=a[p];n.parents&&n.parents.length>0&&n.parents.forEach(c=>{ut(o,a[c],n,a)})})},ft=(r,a)=>{const o=fe().gitGraph,p=r.append("g");a.forEach((n,c)=>{const u=c%F,h=C[n.name].pos,v=p.append("line");v.attr("x1",0),v.attr("y1",h),v.attr("x2",te),v.attr("y2",h),v.attr("class","branch branch"+u),S==="TB"&&(v.attr("y1",30),v.attr("x1",h),v.attr("y2",te),v.attr("x2",h)),ne.push(h);let x=n.name;const l=Le(x),g=p.insert("rect"),s=p.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+u);s.node().appendChild(l);let _=l.getBBox();g.attr("class","branchLabelBkg label"+u).attr("rx",4).attr("ry",4).attr("x",-_.width-4-(o.rotateCommitLabel===!0?30:0)).attr("y",-_.height/2+8).attr("width",_.width+18).attr("height",_.height+4),s.attr("transform","translate("+(-_.width-14-(o.rotateCommitLabel===!0?30:0))+", "+(h-_.height/2-1)+")"),S==="TB"&&(g.attr("x",h-_.width/2-10).attr("y",0),s.attr("transform","translate("+(h-_.width/2-5)+", 0)")),S!=="TB"&&g.attr("transform","translate(-19, "+(h-_.height/2)+")")})},bt=function(r,a,o,p){ht();const n=fe(),c=n.gitGraph;N.debug("in gitgraph renderer",r+`
`,"id:",a,o),X=p.db.getCommits();const u=p.db.getBranchesAsObjArray();S=p.db.getDirection();const h=Ve(`[id="${a}"]`);let v=0;u.forEach((x,l)=>{const g=Le(x.name),f=h.append("g"),s=f.insert("g").attr("class","branchLabel"),_=s.insert("g").attr("class","label branch-label");_.node().appendChild(g);let w=g.getBBox();C[x.name]={pos:v,index:l},v+=50+(c.rotateCommitLabel?40:0)+(S==="TB"?w.width/2:0),_.remove(),s.remove(),f.remove()}),_e(h,X,!1),c.showBranches&&ft(h,u),pt(h,X),_e(h,X,!0),ze.insertTitle(h,"gitTitleText",c.titleTopMargin,p.db.getDiagramTitle()),je(void 0,h,c.diagramPadding,c.useMaxWidth??n.useMaxWidth)},gt={draw:bt},dt=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};
}
`,kt=dt,_t={parser:Ye,db:lt,renderer:gt,styles:kt};export{_t as diagram};