/*
 FusionCharts JavaScript Library - Gantt Chart
 Copyright FusionCharts Technologies LLP
 License Information at <http://www.fusioncharts.com/license>

 @version 3.6.0
*/
FusionCharts.register("module",["private","modules.renderer.js-gantt",function(){var ea=this,E=ea.hcLib,Ea=ea.window,ua=/msie/i.test(Ea.navigator.userAgent)&&!Ea.opera,rb=E.chartAPI,Pa=E.chartAPI,eb=E.extend2,e=E.pluck,d=E.pluckNumber,oa=E.getFirstColor,Fa=E.graphics,T=Fa.convertColor,fb=Fa.getDarkColor,hc=Fa.parseColor,Ca=E.parseUnsafeString,Ga=E.getFirstValue,Zb=E.getValidValue,ka=E.Raphael,ic=E.COMMASTRING,La=E.setLineHeight,Eb=E.getDashStyle,Fb=E.toRaphaelColor,Qa=E.each,jc=E.FC_CONFIG_STRING,
Ma="rgba(192,192,192,"+(ua?.002:1E-6)+")",$b=Fa.mapSymbolName,ua=Math,Ha=ua.ceil,va=ua.round,W=ua.max,Da=ua.min,ac=ua.abs,Ra=parseInt,Gb=parseFloat,kc={pageX:0,pageY:0},U=E.plotEventHandler,ha,ca,sb=E.hasTouch=void 0!==Ea.document.documentElement.ontouchstart,lc=E.addEvent,mc=E.removeEvent,Sa=function(b){return void 0!==b&&null!==b},Ta={left:"start",right:"end",center:"middle"},gb={left:0,right:1,center:.5,undefined:.5},tb={top:1,bottom:0,middle:.5,undefined:.5},Ua={left:5,right:-5,center:0,undefined:0},
Ea=!/fusioncharts\.com$/i.test(Ea.location.hostname),Na=function(b,a){this.min=b.min;this.max=d(b.visibleMax,b.max);this.pixelValueRatio=a/(this.max-this.min);this.startPixel=b.chart.marginLeft+b.chart.ganttStartX};Na.prototype={getPixel:function(b){return this.startPixel+(b-this.min)*this.pixelValueRatio}};Na.prototype.constructor=Na;rb("gantt",{friendlyName:"Gantt Chart",rendererId:"gantt",standaloneInit:!0,defaultSeriesType:"gantt",canvasborderthickness:1,defaultPlotShadow:1,creditLabel:Ea,fireGroupEvent:!0,
defaultPaletteOptions:function(){var b=arguments;return E.extend2(E.extend2(E.extend2(E.extend2({},b[0]),b[1]),b[2]),b[3])}(eb({},E.defaultGaugePaletteOptions),{paletteColors:["AFD8F8 F6BD0F 8BBA00 FF8E46 008E8E D64646 8E468E 588526 B3AA00 008ED6 9D080D A186BE CC6600 FDC689 ABA000 F26D7D FFF200 0054A6 F7941C CC3300 006600 663300 6DCFF6".split(" "),"AFD8F8 F6BD0F 8BBA00 FF8E46 008E8E D64646 8E468E 588526 B3AA00 008ED6 9D080D A186BE CC6600 FDC689 ABA000 F26D7D FFF200 0054A6 F7941C CC3300 006600 663300 6DCFF6".split(" "),
"AFD8F8 F6BD0F 8BBA00 FF8E46 008E8E D64646 8E468E 588526 B3AA00 008ED6 9D080D A186BE CC6600 FDC689 ABA000 F26D7D FFF200 0054A6 F7941C CC3300 006600 663300 6DCFF6".split(" "),"AFD8F8 F6BD0F 8BBA00 FF8E46 008E8E D64646 8E468E 588526 B3AA00 008ED6 9D080D A186BE CC6600 FDC689 ABA000 F26D7D FFF200 0054A6 F7941C CC3300 006600 663300 6DCFF6".split(" "),"AFD8F8 F6BD0F 8BBA00 FF8E46 008E8E D64646 8E468E 588526 B3AA00 008ED6 9D080D A186BE CC6600 FDC689 ABA000 F26D7D FFF200 0054A6 F7941C CC3300 006600 663300 6DCFF6".split(" ")],
bgColor:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],bgAngle:[270,270,270,270,270],bgRatio:["100","100","100","100","100"],bgAlpha:["100","100","100","100","100"],canvasBgColor:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],canvasBgAngle:[0,0,0,0,0],canvasBgAlpha:["100","100","100","100","100"],canvasBgRatio:["","","","",""],canvasBorderColor:["545454","545454","415D6F","845001","68001B"],canvasBorderAlpha:[100,100,100,90,100],gridColor:["DDDDDD","D8DCC5","99C4CD","DEC49C","FEC1D0"],gridResizeBarColor:["999999",
"545454","415D6F","845001","D55979"],categoryBgColor:["F1F1F1","EEF0E6","F2F8F9","F7F0E6","FFF4F8"],dataTableBgColor:["F1F1F1","EEF0E6","F2F8F9","F7F0E6","FFF4F8"],toolTipBgColor:["FFFFFF","FFFFFF","FFFFFF","FFFFFF","FFFFFF"],toolTipBorderColor:["545454","545454","415D6F","845001","68001B"],baseFontColor:["555555","60634E","025B6A","A15E01","68001B"],borderColor:["767575","545454","415D6F","845001","68001B"],borderAlpha:[50,50,50,50,50],legendBgColor:["ffffff","ffffff","ffffff","ffffff","ffffff"],
legendBorderColor:["666666","545454","415D6F","845001","D55979"],plotBorderColor:["999999","8A8A8A","6BA9B6","C1934D","FC819F"],plotFillColor:["EEEEEE","D8DCC5","BCD8DE","E9D8BE","FEDAE3"],scrollBarColor:["EEEEEE","D8DCC5","99C4CD","DEC49C","FEC1D0"]}),charttopmargin:10,chartbottommargin:20,series:function(){var b=this.dataObj,a=b.chart,I=(I=b.categories)||[],c=I.length,p=this.hcJSON,k=p.chart,s=p[jc],y=this.smartLabel,f=this.colorManager,g=p.categories={},v=[],n=this.inCanvasStyle,r=this.numberFormatter,
C=Infinity,l=-Infinity,t=k.origW-k.marginLeft-k.marginRight,D=k.origH-k.marginTop-k.marginBottom,m=b.processes||{},h=m&&m.process,x=h&&h.length,w=Ra(n.fontSize,10),Q=b.datatable,pa=Q&&Q.datacolumn,G=pa&&pa.length,X=b.connectors,L=X&&X.length,M=p.connectors=[],N=b.milestones&&b.milestones.milestone,B=N&&N.length,Z=p.milestone=[],H=b.tasks,$=H&&H.task,K=$&&$.length,u=0,q=0,bc=d(a.forceganttwidthpercent,0),aa=0,U=0,ca=!1,ka={top:"top",bottom:"bottom"},A={top:"top",bottom:"bottom",undefined:"middle"},
R={right:"right",left:"left"},ba={right:"right",left:"left",undefined:"center"},F=p.dataTable={},hb=Infinity,ib=-Infinity,ha=p.processIDMap=[],ea,ua,Ea=d(a.dateintooltip,1),Ha=b.legend&&b.legend.item,Fa=p.tasksMap||(p.tasksMap={}),Na=0,Pa=0,ub,za,Hb,Ib,jb,vb,Qa,Jb,Kb,qa,wa,Aa,Ta,gb,Ua,Qb,wb,rb,xa,na,kb,P,Lb,Va,Wa,Mb,Nb,Ba,la,ma,Xa,Ya,Za,lb,$a,ab,Ia,Ja,fa,sb,Rb,ga,ia,da,mb,nb,bb,V,J,Sb,cb,xb,Ka,yb,Tb,Ob,ob,Ub,zb,Ab,Bb,Cb,Db,Pb,pb,tb,cc,dc,ec,Oa,S,fc,sa,O,ya,ra,qb,ja,Vb,Wb,Xb,Yb,ta,db,gc,z,Y;if(x){p.tasks=
[];delete p.yAxis;delete p.xAxis;k.backgroundColor=T(e(a.bgcolor,"FFFFFF"),e(a.bgalpha,f.getColor("bgAlpha")));d(a.showborder,0)||(k.borderWidth=0);k.plotBorderColor=T(e(a.canvasbordercolor,f.getColor("canvasBorderColor")),0===d(a.showcanvasborder,1)?0:e(a.canvasborderalpha,100));k.backgroundColor={FCcolor:{color:e(a.bgcolor,"FFFFFF"),alpha:e(a.bgalpha,f.getColor("bgAlpha")),angle:e(a.bgangle,f.getColor("bgAngle")),ratio:e(a.bgratio,f.getColor("bgRatio"))}};k.plotBackgroundColor={FCcolor:{color:e(a.canvasbgcolor,
f.getColor("canvasBgColor")),alpha:e(a.canvasbgalpha,f.getColor("canvasBgAlpha")),angle:e(a.canvasbgangle,f.getColor("canvasBgAngle")),ratio:e(a.canvasbgratio,f.getColor("canvasBgRatio"))}};k.plotBorderWidth=d(a.canvasborderthickness,1);k.outputDateFormat=e(a.outputdateformat,k.dateFormat);k.extendCategoryBg=d(a.extendcategorybg,0);k.ganttLineColor=T(e(a.ganttlinecolor,f.getColor("gridColor")),d(a.ganttlinealpha,100));k.ganttLineThickness=d(a.ganttlinethickness,1);k.ganttLineDashStyle=d(a.ganttlinedashed,
0)?Eb(d(a.ganttlinedashlen,1),a.ganttlinedashgap,k.ganttLineThickness):void 0;k.gridBorderColor=T(e(a.gridbordercolor,f.getColor("gridColor")),d(a.gridborderalpha,100));k.gridBorderThickness=d(a.gridborderthickness,1);k.gridBorderDashStyle=d(a.gridborderdashed,0)?Eb(d(a.gridborderdashlen,1),a.gridborderdashgap,k.gridborderThickness):void 0;k.showSlackAsFill=d(a.showslackasfill,1);k.slackFillColor=oa(e(a.slackfillcolor,"FF5E5E"));k.gridResizeBarColor=T(e(a.gridresizebarcolor,f.getColor("gridResizeBarColor")),
d(a.gridresizebaralpha,100));k.gridResizeBarThickness=d(a.gridresizebarthickness,1);k.taskBarRoundRadius=d(a.taskbarroundradius,0);k.taskBarFillMix=a.taskbarfillmix;k.taskBarFillRatio=a.taskbarfillratio;void 0===k.taskBarFillMix&&(k.taskBarFillMix="{light-10},{dark-20},{light-50},{light-85}");void 0===k.taskBarFillRatio&&(k.taskBarFillRatio="0,8,84,8");k.connectorExtension=d(a.connectorextension,10);k.clickURL=e(a.clickurl,"");k.annRenderDelay=a.annrenderdelay;k.taskDatePadding=d(a.taskdatepadding,
3);k.taskLabelPadding=d(a.tasklabelspadding,2);k.ganttStartX=d(a.ganttwidthpercent,65);100<k.ganttStartX&&(k.ganttStartX=100);Aa=k.ganttStartX=.01*(100-k.ganttStartX)*t;k.gridWidth=t-k.ganttStartX;gc=d(a.showfulldatatable,1);bb=m.width;bb=d(k.ganttStartX*(/\%/g.test(bb)&&.01*Gb(bb,10))||bb);Aa-=d(bb,0);ea=va(bb);U+=1;for(z=0;z<G;z+=1)Jb=pa[z].width,Kb=d(k.ganttStartX*(/\%/g.test(Jb)&&.01*Gb(Jb,10))||Jb),Aa-=d(Kb,0),Kb=pa[z].width=va(Kb),U+=1;0<=Aa?Aa/=U:(ca=!0,Aa=k.ganttStartX/U);if(bc||!gc)for((isNaN(ea)||
ca)&&(ea=Aa),z=0;z<G;z+=1)(isNaN(pa[z].width)||ca)&&(pa[z].width=Aa);for(z=0;z<c;z+=1){ia=I[z];C=Infinity;l=-Infinity;mb=e(ia.bgcolor,f.getColor("categoryBgColor"));nb=d(ia.bgalpha,100);Xa=e(ia.font,n.fontFamily);Ya=d(ia.fontsize,w+1);Za=e(ia.fontcolor,n.color);lb=d(ia.isbold,1);$a=d(ia.isitalic,0);ab=d(ia.isunderline,0);d(ia.verticalpadding,3);Ia=e(ia.align,"center").toLowerCase();Ja=e(ia.valign,"middle").toLowerCase();sb=(Rb=ia.category)&&Rb.length;Oa=0;ja={};for(Y=0;Y<sb;Y+=1)ga=Rb[Y],la=r.getDateValue(ga.start).ms,
ma=r.getDateValue(ga.end).ms,isNaN(la)&&(la=void 0),la>l&&(l=la),la<=C&&(C=la),isNaN(ma)&&(ma=void 0),ma>l&&(l=ma),ma<=C&&(C=ma),fa=Ca(e(ga.label,ga.name)),S={color:oa(e(ga.fontcolor,Za)),fontFamily:e(ga.font,Xa),fontSize:d(ga.fontsize,Ya)+"px",fontWeight:d(ga.isbold,lb)&&"bold"||"normal",fontStyle:d(ga.isitalic,$a)&&"italic"||"normal",textDecoration:d(ga.isunderline,ab)&&"underline"||"none"},La(S),y.setStyle(S),qa=y.getOriSize(fa),Oa=W(Oa,qa.height),O="FCCAT_"+z+"_"+Y,Hb=e(ga.hoverbandcolor,ia.hoverbandcolor,
a.categoryhoverbandcolor,a.hoverbandcolor,f.getColor("gridColor")),Ib=d(ga.hoverbandalpha,ia.hoverbandalpha,a.categoryhoverbandalpha,a.hoverbandalpha,30),jb=d(ga.showhoverband,ia.showhoverband,a.showcategoryhoverband,a.showhoverband,a.showhovereffect,1),g[O]={text:fa,style:S,start:la,end:ma,index:Y,isLast:z===c-1,bgColor:T(e(ga.bgcolor,mb),d(ga.bgalpha,nb)),dimension:ja,link:ga.link,align:ba[[e(ga.align,Ia).toLowerCase()]],vAlign:A[ka[e(ga.valign,Ja).toLowerCase()]],hoverColor:T(Hb,Ib),useHover:jb,
usePlotHover:d(ga.showganttpanehoverband,ia.showganttpanehoverband,a.showganttpaneverticalhoverband,jb)},g[ya]&&(g[ya].nextCol=g[O],g[O].prevCol=g[ya]),ya=O;if(xb=g["FCCAT_"+z+"_0"])g[O].first=xb,xb.last=g[O],g[cb]&&(g[cb].nextRow=xb,xb.prevRow=g[cb]);cb=O;ja.h=Oa+5+2*d(ia.verticalpadding,3);ja.y=q;ja.min=C;ja.max=l;ja.numCat=Y;q+=ja.h;ib=W(ib,l);hb=Da(hb,C)}g.min=hb;g.max=ib;if(x){Oa=wa=0;db="right"===e(m.positioningrid,"left").toLowerCase();S={color:oa(e(m.headerfontcolor,n.color)),fontFamily:e(m.headerfont,
n.fontFamily),fontSize:d(m.headerfontsize,w+3)+"px",fontWeight:d(m.headerisbold,1)&&"bold"||"normal",fontStyle:d(m.headerisitalic,0)&&"italic"||"normal",textDecoration:d(m.headerisunderline,0)&&"underline"||"none"};La(S);fa=Ca(m.headertext);y.setStyle(S);qa=y.getOriSize(fa);wa=W(wa,qa.width);Ia=ba[R[e(m.headeralign,"center").toLowerCase()]];Ja=A[ka[e(m.headervalign,"middle").toLowerCase()]];ja={};O=ra=cb="processHeader";F.processHeader={text:fa,style:S,align:Ia,vAlign:Ja,isHeader:!0,link:e(m.headerlink),
dimension:{x:0,w:0,h:W(qa.height,q)},bgColor:T(e(m.headerbgcolor,f.getColor("dataTableBgColor")),d(m.headerbgalpha,100)),key:O,isLast:db,drawResizer:!db&&G,prevCol:null,nextCol:null,prevRow:null,nextRow:null};mb=e(m.bgcolor,f.getColor("dataTableBgColor"));nb=d(m.bgalpha,100);Xa=e(m.font,n.fontFamily);Ya=d(m.fontsize,w);Za=e(m.fontcolor,n.color);lb=d(m.isbold,0);$a=d(m.isitalic,0);ab=d(m.isunderline,0);Ia=e(m.align,"center").toLowerCase();Ja=e(m.valign,"middle").toLowerCase();for(z=0;z<x;z+=1)da=h[z],
Hb=e(da.hoverbandcolor,m.hoverbandcolor,a.processhoverbandcolor,a.hoverbandcolor,f.getColor("gridColor")),Ib=d(da.hoverbandalpha,m.hoverbandalpha,a.processhoverbandalpha,a.hoverbandalpha,30),jb=d(da.showhoverband,m.showhoverband,a.showprocesshoverband,a.showhoverband,a.showhovereffect,1),S={color:oa(e(da.fontcolor,Za)),fontSize:d(da.fontsize,Ya)+"px",fontFamily:e(da.font,Xa),fontWeight:d(da.isbold,lb)&&"bold"||"normal",fontStyle:d(da.isitalic,$a)&&"italic"||"normal",textDecoration:d(da.isunderline,
ab)&&"underline"||"none"},La(S),fa=Ca(e(da.label,da.name)),y.setStyle(S),qa=y.getOriSize(fa),Oa=W(Oa,qa.height),wa=W(wa,qa.width),ya=O,O=e(da.id,"__FCDPID__"+z).toUpperCase(),F[O]&&(O="__FCDPID__"+z),ha[z]=O,Sa(ub=d(da.height,a.rowheight))&&(ub=ac(ub),Na+=ub||0,Pa+=1),F[O]={text:qa.text,style:S,link:da.link,id:O,processHeight:ub,labelHeight:qa.height,align:ba[[e(da.align,Ia).toLowerCase()]],vAlign:A[ka[e(da.valign,Ja).toLowerCase()]],bgColor:T(e(da.bgcolor,mb),d(da.bgalpha,nb)),prevCol:F[ya],dimension:{},
hoverColor:T(Hb,Ib),useHover:jb,usePlotHover:d(da.showganttpanehoverband,m.showganttpanehoverband,a.showganttpanehorizontalhoverband,jb),isLast:db,nextCol:null,prevRow:null,nextRow:null},F[ya]&&(F[ya].nextCol=F[O]);F[O].first=F[ra];F[ra].last=F[O];F[ra].processCount=x;F[ra].countDefinedHeight=Pa;F[ra].totalHeight=Na;ua=F[ra].maxProcessHeight=Oa+8;isNaN(ea)&&(ea=wa+10);aa+=ea;ja.x=0;F[ra].dimension.w=ja.w=ea;ja.h=ua=W((D-F[ra].dimension.h)/x,ua)}db&&(aa=0);if(G)for(p.datacolumns=[],z=0;z<G;z+=1){V=
pa[z];wa=0;mb=oa(e(V.bgcolor,Q.bgcolor,f.getColor("dataTableBgColor")));nb=d(V.bgalpha,Q.bgalpha,100);Xa=e(V.font,Q.font,n.fontFamily);Za=oa(e(V.fontcolor,Q.fontcolor,n.color));Ya=d(V.fontsize,Q.fontsize,w);lb=d(V.isbold,Q.isbold,0);$a=d(V.isitalic,Q.isitalic,0);ab=d(V.isunderline,Q.isunderline,0);Ia=ba[R[e(V.align,Q.align,"center").toLowerCase()]];Ja=A[ka[e(V.valign,Q.valign,"middle").toLowerCase()]];S={color:oa(e(V.headerfontcolor,Q.headerfontcolor,Za)),fontFamily:e(V.headerfont,Q.headerfont,Xa),
fontSize:d(V.headerfontsize,Q.headerfontsize,Ya+3)+"px",fontWeight:d(V.headerisbold,Q.headerisbold,1)&&"bold"||"normal",fontStyle:d(V.headerisitalic,Q.headerisitalic,$a)&&"italic"||"normal",textDecoration:d(V.headerisunderline,Q.headerisunderline,ab)&&"underline"||"none"};La(S);fa=Ca(V.headertext);y.setStyle(S);qa=y.getOriSize(fa);wa=W(wa,qa.width);O=ra="_FCDtHeader_"+z;kb=F[O]={text:fa,style:S,align:ba[R[e(V.headeralign,Q.headeralign,Ia).toLowerCase()]],vAlign:A[ka[e(V.headervalign,Q.headervalign,
Ja).toLowerCase()]],link:e(V.headerlink),drawResizer:db||z<G-1,dimension:{x:0+aa,w:V.width,h:F.processHeader&&F.processHeader.dimension.h},isHeader:!0,key:O,bgColor:T(e(V.headerbgcolor,Q.headerbgcolor,f.getColor("dataTableBgColor")),d(V.headerbgalpha,Q.headerbgalpha,100))};kb.data=[];fc=V.text||[];qb=F.processHeader;Ka=F[cb];Ka.nextRow=F[O];F[O].prevRow=Ka;qb=qb.nextCol;Ka=Ka.nextCol;ja={};cb=ra;for(Y=0;qb;qb=qb.nextCol,Ka=Ka.nextCol,Y+=1)ya=O,O="_FCDt_"+z+"_"+Y,(sa=fc[Y])?(S={fontFamily:e(sa.font,
Xa),color:oa(e(sa.fontcolor,Za)),fontSize:d(sa.fontsize,Ya)+"px",fontWeight:d(sa.isbold,lb)&&"bold"||"normal",fontStyle:d(sa.isitalic,$a)&&"italic"||"normal",textDecoration:d(sa.isunderline,ab)&&"underline"||"none"},La(S),y.setStyle(S),fa=Ca(sa.label),qa=y.getOriSize(fa),wa=W(wa,qa.width),F[O]={text:fa,style:S,link:e(sa.link,""),bgColor:T(e(sa.bgcolor,mb),d(sa.bgalpha,nb)),align:ba[R[e(sa.align,Ia).toLowerCase()]],vAlign:A[ka[e(sa.valign,Ja).toLowerCase()]],prevCol:F[ya],dimension:ja,nextCol:null,
nextRow:null,prevRow:null}):F[O]={prevCol:F[ya],dimension:ja,isNaN:!0,nextCol:null,nextRow:null,prevRow:null},F[ya].nextCol=F[O],F[O].prevRow=Ka,Ka.nextRow=F[O],F[O].hoverColor=F[ha[Y]].hoverColor,F[O].useHover=F[ha[Y]].useHover,F[O].usePlotHover=F[ha[Y]].usePlotHover;F[O].first=F[ra];F[ra].last=F[O];isNaN(V.width)?kb.width=wa+10:kb.width=V.width;ja.x=0+aa;aa+=F[ra].dimension.w=ja.w=kb.width;ja.h=ua;p.datacolumns.push(kb)}db&&(da=F.processHeader,da.dimension.x=da.nextCol.dimension.x=aa,aa+=ea);bc||
(k.ganttStartX=Da(k.ganttStartX,aa));k.totalGridWidth=aa;Wb=b.trendlines||{};p.trendlines=[];for(z=0;z<Wb.length;z+=1)for(B=(Xb=Wb[z].line)&&Xb.length,Y=0;Y<B;Y+=1)ta=Xb[Y],Yb=d(ta.istrendzone,0),Ba=e(ta.color,f.getColor("legendBorderColor")),S=eb({},s.trendStyle),S.color=T(Ba),La(S),p.trendlines.push({start:r.getDateValue(ta.start).ms,end:r.getDateValue(ta.end).ms,displayValue:Ca(e(ta.displayvalue,ta.start)),color:T(Ba,d(ta.alpha,Yb?40:99)),style:S,isTrendZone:Yb,dashedStyle:d(ta.dashed,0)?Eb(d(ta.dashlen,
3),d(ta.dashgap,3),d(ta.thickness,1)):void 0,thickness:d(ta.thickness,1)});if(K){C=Infinity;l=-Infinity;d(a.taskbarroundradius,0);Wa=a.taskbarfillmix;Mb=a.taskbarfillratio;void 0===Wa&&(Wa="{light-10},{dark-20},{light-50},{light-85}");void 0===Mb&&(Mb="0,8,84,8");k.shadow=d(a.showshadow,1);Qa=d(a.showslackasfill,1);for(z=0;z<K;z+=1)J=$[z],Sb=u%x,la=r.getDateValue(J.start).ms,ma=r.getDateValue(J.end).ms,O=e(F[Ga(J.processid,"").toUpperCase()],F["__FCDPID__"+Sb],F[ha[Sb]]).id.toUpperCase(),yb=d(J.alpha,
H.alpha,100),Ba=e(J.color,H.color,f.getColor("plotFillColor")),Ob=d(J.borderalpha,H.borderalpha,100),Tb=e(J.bordercolor,H.bordercolor,f.getColor("plotBorderColor")),isNaN(la)&&(la=void 0),la>l&&(l=la),la<=C&&(C=la),isNaN(ma)&&(ma=void 0),ma>l&&(l=ma),ma<=C&&(C=ma),S={color:oa(e(J.fontcolor,H.fontcolor,n.color)),fontSize:d(J.fontsize,H.fontsize,w)+"px",fontFamily:e(J.font,H.font,n.fontFamily)},La(S),u+=1,ob=f.parseColorMix(Ba,Wa),Ub=f.parseAlphaList(yb.toString(),ob.length),zb=f.parseRatioList(Mb,
ob.length),Ab=d(J.angle,H.angle,270),Pb=f.parseColorMix(e(J.slackfillcolor,H.slackfillcolor,a.slackfillcolor,"FF5E5E"),Wa),pb=Da(d(J.percentcomplete,-1),100),fa=Ga(e(J.label,J.name),""),Db="",d(J.showlabel,J.showname,H.showlabels,H.showname,a.showtasklabels,a.showtasknames,0)&&(Db=fa),d(J.showpercentlabel,H.showpercentlabel,a.showpercentlabel,0)&&-1!==pb&&(Db+=" "+pb+"%"),tb={FCcolor:{color:ob.join(),alpha:Ub,ratio:zb,angle:Ab}},Pb=Qa?{FCcolor:{color:Pb.join(),alpha:Ub,ratio:zb,angle:Ab}}:Ma,cc={FCcolor:{color:f.parseColorMix(e(J.hoverfillcolor,
H.hoverfillcolor,a.taskhoverfillcolor,fb(Ba,80)),Wa).join(),alpha:f.parseAlphaList(e(J.hoverfillalpha,H.hoverfillalpha,a.taskhoverfillalpha,yb).toString(),ob.length),ratio:zb,angle:Ab}},dc=T(e(J.hoverbordercolor,H.hoverbordercolor,a.taskhoverbordercolor,fb(Tb,80)),e(J.hoverborderalpha,H.hoverborderalpha,a.taskhoverborderalpha,Ob)),ec=Qa?{FCcolor:{color:f.parseColorMix(fb(e(J.slackhoverfillcolor,H.slackhoverfillcolor,a.slackhoverfillcolor,a.slackfillcolor,"FF5E5E"),80),Wa).join(),alpha:f.parseAlphaList(e(J.slackhoverfillalpha,
H.slackhoverfillalpha,a.slackhoverfillalpha,yb).toString(),ob.length),ratio:zb,angle:Ab}}:Ma,Bb=r.getFormattedDate(la),Cb=r.getFormattedDate(ma),za=Zb(Ca(e(J.tooltext,J.hovertext,H.plottooltext,s.tooltext))),za=void 0!==za?E.parseTooltext(za,[3,28,29,30,31],{end:Cb,start:Bb,label:fa,percentComplete:-1!==pb?r.percentValue(pb):"",processName:F[O]&&F[O].text},J):(""!==fa?fa+(Ea?", ":""):"")+(Ea?Bb+" - "+Cb:""),Va=Ga(J.id,"").toUpperCase(),Fa[Ga(Va,z)]={dataObj:{processId:O,label:Db,labelAlign:ba[[e(J.labelalign,
a.tasklabelsalign,"center").toLowerCase()]],link:J.link,start:la,end:ma,id:Ga(J.id,"").toUpperCase(),showAsGroup:d(J.showasgroup,0),animation:d(J.animation,a.animation,a.defaultanimation,1),style:S,percentComplete:pb,color:Fb(tb),slackColor:Fb(Pb),hoverFillColor:Fb(cc),hoverBorderColor:dc,slackHoverColor:Fb(ec),showHoverEffect:d(J.showhovereffect,H.showhovereffect,a.showtaskhovereffect,a.showhovereffect,1),shadow:{opacity:W(yb,Ob)/100,inverted:!0},borderColor:T(Tb,Ob),borderThickness:d(J.showborder,
H.showborder,1)?d(J.borderthickness,H.borderthickness,1):0,height:e(J.height,"35%"),topPadding:e(J.toppadding,"35%"),showPercentLabel:d(J.showpercentlabel,H.showpercentlabel,a.showpercentlabel,0),startDate:d(J.showstartdate,H.showstartdate,a.showtaskstartdate)?Bb:void 0,endDate:d(J.showenddate,H.showenddate,a.showtaskenddate)?Cb:void 0,toolText:za,_start:J.start,_end:J.end,_formatSDate:Bb,_formatEDate:Cb,_label:fa}},v.push(Fa[Ga(Va,z)].dataObj);ib=W(ib,l);hb=Da(hb,C)}p.series.push({showInLegend:!1,
data:v});B=N&&N.length;for(z=0;z<B;z+=1)P=N[z],Va=Ga(P.taskid,"").toUpperCase(),Nb=e(P.shape,"polygon").toLowerCase(),Lb=d(P.numsides,5),Vb=0,"star"===Nb?Vb=.4:(Nb=$b(Lb),Nb=$b(Lb).split("-")[0]),Ba=e(P.color,f.getColor("legendBorderColor")),za=Zb(Ca(e(P.tooltext,P.hovertext,a.milestonetooltext))),void 0!==za&&Fa[Va]?(J=Fa[Va].dataObj,za=E.parseTooltext(za,[28,32,33,34,35,36],{date:r.getFormattedDate(P.date),taskStartDate:J._formatSDate,taskEndDate:J._formatEDate,taskLabel:J._label,taskPercentComplete:-1!==
J.percentComplete?r.percentValue(J.percentComplete):"",processName:F[J.processId]&&F[J.processId].text},P)):za=r.getFormattedDate(P.date),S={color:oa(e(P.fontcolor,a.milestonefontcolor,n.color)),fontSize:d(P.fontsize,a.milestonefontsize,w)+"px",fontFamily:e(P.font,a.milestonefont,n.fontFamily),fontWeight:d(P.fontbold,a.milestonefontbold,0)&&"bold"||"normal",fontStyle:d(P.fontitalic,a.milestonefontitalic,0)&&"italic"||"normal"},La(S),Z.push({numSides:Lb,startAngle:d(P.startangle,90),radius:P.radius,
origDate:P.date,date:r.getDateValue(P.date),fillColor:oa(Ba),fillAlpha:.01*d(P.fillalpha,P.alpha,100),borderColor:oa(e(P.bordercolor,Ba)),borderAlpha:.01*d(P.borderalpha,P.alpha,100),displayValue:Ca(P.label),style:S,hoverFillColor:oa(e(P.hoverfillcolor,a.milestonehoverfillcolor,fb(Ba,80))),hoverFillAlpha:.01*d(P.hoverfillalpha,a.milestonehoverfillalpha,P.fillalpha,P.alpha,100),hoverBorderColor:oa(e(P.hoverbordercolor,a.milestonehoverbordercolor,fb(e(P.bordercolor,Ba),80))),hoverBorderAlpha:.01*d(P.hoverborderalpha,
a.milestonehoverborderalpha,P.borderalpha,P.alpha,100),showHoverEffect:d(P.showhovereffect,a.showmilestonehovereffect,a.showhovereffect,1),depth:Vb,taskId:Va,borderThickness:d(P.borderthickness,1),link:P.link,toolText:za});for(z=0;z<L;z+=1)if(gb=(Ta=(xa=X[z])&&xa.connector)&&Ta.length)for(Y=0;Y<gb;Y+=1)na=Ta[Y],Ua=e(na.color,xa.color,f.getColor("plotBorderColor")),Qb=d(na.alpha,xa.alpha,100),wb=d(na.thickness,xa.thickness,1),rb=d(na.isdashed,xa.isdashed,1),M.push({fromTaskId:Ga(na.fromtaskid,"").toUpperCase(),
toTaskId:Ga(na.totaskid,"").toUpperCase(),fromTaskConnectStart:d(na.fromtaskconnectstart,0),toTaskConnectStart:d(na.totaskconnectstart,1),color:T(Ua),alpha:.01*Qb,link:na.link,showHoverEffect:d(na.showhovereffect,xa.showhovereffect,a.showconnectorhovereffect,a.showhovereffect,1),hoverColor:T(e(na.hovercolor,xa.hovercolor,a.connectorhovercolor,fb(Ua,80)),d(na.hoveralpha,xa.hoveralpha,a.connectorhoveralpha,Qb)),hoverThickness:d(na.hoverthickness,xa.hoverthickness,a.connectorhoverthickness,wb),thickness:wb,
dashedStyle:rb?Eb(d(na.dashlen,xa.dashlen,5),d(na.dashgap,xa.dashgap,wb),wb):void 0});p.legend.enabled=Boolean(d(a.showlegend,1));p.legend.interactiveLegend=!1;p.legend.itemStyle.cursor="default";p.legend.itemHoverStyle={cursor:"inherit"};B=Ha&&Ha.length;for(z=0;z<B;z+=1)vb=Ha[z],Sa(vb.label)&&""!==vb.label&&p.series.push({name:Ca(vb.label),showInLegend:!0,type:!1,color:hc(e(vb.color,f.getPlotColor()))});p.max=ib;p.min=hb;p.chart.hasScroll=!0;return p}},spaceManager:function(b,a,I,c){this.titleSpaceManager(b,
a,I,.3*c);var p=this.numberFormatter,k=b.chart,s=a.chart,y=b.dataTable,f=b.categories,g=b.scrollOptions={},v=y.__scrollOptions={},n=y.processHeader;c=c-k.marginTop-k.marginBottom;I=I-k.marginLeft-k.marginRight;var r=k.totalGridWidth,C=b.verticalScroll={enabled:d(s.useverticalscrolling,1)},l=d(s.ganttpaneduration,-1),t=e(s.ganttpanedurationunit,"s").toLowerCase(),D=p.getDateValue(s.scrolltodate).ms,m=n&&n.maxProcessHeight,h,x,p=0;if(n){h=n.processCount-n.countDefinedHeight;b.legend.enabled&&(c-=this.placeLegendBlockBottom(b,
a,I,c/2));c-=n.dimension.h;g.padding=d(s.scrollpadding,b.chart.plotBorderWidth/2);g.height=d(s.scrollheight,16);g.showButtons=!!d(s.scrollshowbuttons,1);g.buttonPadding=d(s.scrollbtnpadding,0);g.flatScrollBars=d(s.flatscrollbars,0);g.color=oa(e(s.scrollcolor,this.colorManager.getColor("altHGridColor")));a=g.height+g.padding;r>k.ganttStartX&&(v.enabled=!0,v.startPercent=Boolean(d(s.scrolltoend,0)));I-=k.ganttStartX;f.scroll={};g=new Date(f&&f.min);if(-1!==l){switch(t){case "y":g.setYear(g.getFullYear()+
l);break;case "m":g.setMonth(g.getMonth()+l);break;case "d":g.setDate(g.getDate()+l);break;case "h":g.setHours(g.getHours()+l);break;case "mn":g.setMinutes(g.getMinutes()+l);break;default:g.setSeconds(g.getSeconds()+l)}g=g.getTime();g>b.min&&g<b.max&&(b.visibleMax=g,f.scroll.enabled=!0)}if(v.enabled||f.scroll.enabled)c-=a;v=c-n.totalHeight;g=v/(h?h:n.processCount);!d(s.forcerowheight,0)&&!h&&n.totalHeight<c&&(g=c/n.processCount,v=c,x=!0);m>g&&(m=3>m-g?g:v/va(v/m));n.maxProcessHeight=m;C.enabled&&
g<m&&h||0>g?(v=m,C.startPercent=Boolean(d(s.scrolltoend,0)),I-=a):(C.enabled=!1,v=g);f.scroll.startPercent=d(s.scrolltoend,0);if(Infinity===b.min||-Infinity===b.max||b.min===b.max)b.min=f.min=0,b.max=f.max=1;if(Infinity===f.min||-Infinity===f.max)f.min=b.min,f.max=b.max;f.axis=new Na(b,I);f.startX=f.axis.getPixel(Da(f.min,b.min));f.endX=f.axis.getPixel(W(f.max,b.max));f.visibleW=I;D&&D>f.min&&D<f.max&&(f.scroll.startPercent=Da((f.axis.getPixel(D)-f.startX)/(f.endX-f.startX-f.visibleW),1));for(n=n.nextCol;n;){p+=
n.dimension.h=x?v:n.processHeight||v;if(b=n.nextRow)for(;b;)b.dimension.h=n.dimension.h,b=b.nextRow;n=n.nextCol}y.processHeader.totalPH=p;k.processHeight=c+y.processHeader.dimension.h}}},rb.gaugebase);Pa("renderer.gantt",{drawProcess:function(b){var a=this,d=a.options,c=d.chart,p=a.paper,k=a.logic,s=k.smartLabel,y=a.canvasTop,f=a.canvasLeft,g=a.layers,v=g.gridLayer,n=g.gridHeaderLayer,r=c.gridBorderThickness,C=.5*r,l=c.gridBorderColor,t=c.gridBorderDashStyle,D=0,m=0,h=[],x=y,w=b.dimension.w||16,Q=
b.dimension.x||0,pa=d.dataTable.processHeader,G=pa.nextCol.dimension.h,X=pa.totalPH,k=T(e(k.dataObj.chart.rolloverbandcolor,"#FF0000"),e(k.dataObj.chart.rolloverbandalpha,30)),L=pa.items||(pa.items={}),d=d.categories||{},M,N,B,Z,H,$,K,u,q,E,aa;L.hoverEle||(L.hoverEle=p.rect(d.startX,0,d.endX,G,0,g.dataset).attr({fill:k,visibility:"hidden","stroke-width":0}));q=function(b){U.call(this,a,b,"ProcessClick")};E=function(b){ha=clearTimeout(ha);if(!ca||ca.removed)ca=null;ca&&a.gridOutHandler.call(ca);a.gridHoverHandler.call(this);
U.call(this,a,b,"ProcessRollOver")};for(aa=function(b){ca=this;ha=clearTimeout(ha);ha=setTimeout(function(){a.gridOutHandler.call(ca)},500);U.call(ca,a,b,"ProcessRollOut")};b;)u=b.dimension,K=f+Q,B=b.text,B=b.align,L=b.items||(b.items={}),G=b.link,N=b.isHeader?n:v,Z=L.background,d=Ha(x+m)-.5,B={x:Ha(K+D)-.5,y:d,width:w+.5,height:u.h+C+.5,radius:0,fill:b.bgColor||Ma,"stroke-dasharray":t,stroke:l,cursor:G?"pointer":"","stroke-width":0},Z?Z.attr(B):(L.background=p.rect(N).attr(B).hover(E,aa),M={isHeader:b.isHeader,
label:b.text,vAlign:b.vAlign,align:b.align,link:b.link,id:b.id},L.background.click(q).data("dataObj",b).data("eventArgs",M).data("data",{y:d,gridObj:b,rollOverColor:k,useHover:!0,useNext:!0,height:u.h+C+.5,hoverEle:pa.items.hoverEle})),b.isNaN||(u=b.dimension,B=b.text,B=b.align,Z=L.label,B=b.text,Sa(B)&&""!==B&&($=b.style,s.setStyle($),H=s.getSmartText(B,w-8,W(Ra($.lineHeight,10),u.h)),$.title=H.oriText,B=b.align,B={text:H.text,x:K+w*gb[B]+Ua[B],y:x+u.h-u.h*tb[b.vAlign],"text-anchor":Ta[B],cursor:G?
"pointer":"","vertical-align":b.vAlign},Z?Z.attr(B):L.label=p.text(N).attr(B).css($).hover(E,aa).click(q).data("eventArgs",M).data("dataObj",b).data("data",{y:d,gridObj:b,rollOverColor:k,useHover:!0,height:u.h+C+.5,useNext:!0,hoverEle:pa.items.hoverEle}))),b.xPos=K,b.yPos=Ha(x+u.h)-r%2*.5,h.push("M",K,b.yPos,"h",w),(Z=L.hBorder)?Z.attr("path",h):L.hBorder=p.path(h,N).attr({"stroke-dasharray":t,stroke:l,"stroke-width":r}),x+=u.h,b.nextCol||(D=C,m-=0,Z=b.first.items.vBorder,B=["M",Ha(K+w)-r%2*.5,y,
"v",X],Z?Z.attr("path",B):b.first.items.vBorder=p.path(B,n).attr({"stroke-dasharray":t,stroke:l,"stroke-width":r}),b.nextRow&&!b.isLast&&(b.first.items.dragEle||(b.first.items.dragEle=p.path(B,g.gridTracker).attr({stroke:c.gridResizeBarColor,"stroke-width":c.gridResizeBarThickness,visibility:"hidden"})),b.first.items.tracker||(b.first.items.tracker=p.path(B,g.gridTracker).attr({stroke:Ma,ishot:!0,"stroke-width":30}).css("cursor",ka.svg&&"ew-resize"||"e-resize").drag(this.dragMove,this.dragStart,this.dragUp).data("drag-options",
{grid:b.first,xPos:Ha(K+w)-r%2*.5,chart:a})))),b=b.nextCol},dragStart:function(){var b=this.data("drag-options"),a=b.grid,I=a.items,c=a.nextRow,e={style:{lineHeight:16}},k=a.nextCol.style||e,s=c&&c.nextCol&&c.nextCol.style||e,y=b.chart,f=y.canvasLeft,g=a.dimension,k=W(Ra(a.style.lineHeight,10),Ra(k.lineHeight,10))+2,e=W(Ra((c||e).style.lineHeight,10),Ra(s.lineHeight,10))+2;b.leftSideLimit=f+d(a.dimension.x,0)+k;b.rightSideLimit=f+d(c&&c.dimension.x+c.dimension.w,g.x+g.w)-e;b.origX=b.lastX||(b.lastX=
0);I.dragEle.show();y.trackerClicked=!0;b.draged=!1},dragMove:function(b){var a=this.data("drag-options"),d=a.grid.items,c=a.xPos+b,e=a.leftSideLimit,k=a.rightSideLimit;c<e&&(b=e-a.xPos);c>k&&(b=k-a.xPos);c={transform:"t"+(a.origX+b)+ic+0};this.attr(c);d.dragEle.attr(c);a.draged=!0;a.lastX=b},dragUp:function(){var b=this.data("drag-options"),a=b.chart,d=b.grid,c=d.nextRow,e=a.canvasLeft,k=d.dimension,s=c&&c.dimension,y=d.items,f={hcJSON:{dataTable:{}}};a.trackerClicked=!1;y.dragEle.hide();b.draged&&
(k.w=b.xPos+b.lastX-e-k.x,d.nextCol&&(d.nextCol.dimension.w=k.w),f.hcJSON.dataTable[d.key]={dimension:k},c&&(s.w+=s.x-k.x-k.w,s.x=k.x+k.w,c.dimension.w=s.w,c.dimension.x=s.x,a.drawProcess(c),f.hcJSON.dataTable[c.key]={dimension:s}),a.drawProcess(d),eb(a.logic.chartInstance.jsVars._reflowData,f,!0),b.xPos+=b.lastX,b.lastX+=b.origX)},drawCategories:function(){var b=this,a=b.options,e=a.chart,c=b.paper,p=b.layers,k=b.logic.smartLabel,s=b.canvasTop,y=a.categories,f=a.dataTable.processHeader,g=y.FCCAT_0_0,
v=y.axis,n=y.endX,r=y.startX,C=n-r,l=e.ganttLineThickness,t=f.totalPH+f.dimension.h,D=[],m=[],h=p.dataset,p=p.ganttHeaderLayer,x,w,Q,E,G,X,L,M,N,B,Z,H,$,K,u;$=function(a){U.call(this,b,a,"CategoryClick")};K=function(a){ha=clearTimeout(ha);if(!ca||ca.removed)ca=null;ca&&b.gridOutHandler.call(ca);b.gridHoverHandler.call(this);U.call(this,b,a,"CategoryRollOver")};u=function(a){ca=this;ha=clearTimeout(ha);ha=setTimeout(function(){b.gridOutHandler.call(ca)},500);U.call(ca,b,a,"CategoryRollOut")};E=y.items||
(y.items={});f=a.dataTable.processHeader;for(E.hoverEle=c.rect(0,s+f.dimension.h,50,f.totalPH,0,h).attr({fill:Ma,visibility:"hidden","stroke-width":0});g;)w=C/g.dimension.numCat,G=r+w*(g.index+1),N=G-w,M=g.dimension.h,B=N,H=s+g.dimension.y,X=g.align,L=g.vAlign,Q=g.link,E=g.items||(g.items={}),w=!(!g.nextRow&&g.nextCol),Z=a.verticalScroll.enabled&&w?a.scrollOptions.height:0,x={align:g.align,vAlign:g.vAlign,link:g.link,text:g.text},N=B=d(v.getPixel(g.start),N),G=d(v.getPixel(!w&&g.nextCol.start||(w?
W(g.end||0,a.max):void 0)),G),w=G-N,B=va(B)+.5,H=va(H)+.5,g.isLast&&(D.push("M",B,H,"v",t-g.dimension.y),H-=.5*l,M-=l,e.extendCategoryBg&&c.rect(B,H,w,t,0,h).attr({fill:g.bgColor,"stroke-width":0,stroke:e.ganttLineColor}).toBack()),E.background=c.rect(B,H,w+Z,M,0,p).attr({fill:g.bgColor,"stroke-width":0,cursor:Q?"pointer":"",stroke:e.ganttLineColor}).click($).data("eventArgs",x).data("dataObj",g).hover(K,u).data("data",{x:B,width:w,gridObj:g,hoverEle:y.items.hoverEle}),m.push("M",B,H,"v",M),g.nextRow&&
m.push("M",r,H+M,"H",n+Z),k.setStyle(g.style),G=k.getSmartText(g.text,w-5,M),g.style.title=G.oriText,E.label=c.text(p).attr({text:G.text,x:B+w*gb[X]+Ua[X],y:H+M-M*tb[L],"text-anchor":Ta[X],cursor:Q?"pointer":"","vertical-align":L}).css(g.style).hover(K,u).click($).data("eventArgs",x).data("dataObj",g).data("data",{x:B,width:w,gridObj:g,hoverEle:y.items.hoverEle}),g=g.nextCol;for(;f;)D.push("M",y.startX,f.yPos,"H",n),f=f.nextCol;E=y.items||(y.items={});E.headerGrid=c.path(m,p).attr({"stroke-dasharray":e.ganttLineDashStyle,
"stroke-width":l,stroke:e.ganttLineColor});E.processGrid=c.path(D,h).attr({"stroke-dasharray":e.ganttLineDashStyle,"stroke-width":e.ganttLineThickness,stroke:e.ganttLineColor})},drawScroller:function(){var b=this,a=b.options,e=b.paper,c=b.layers,p=b.canvasTop,k=b.canvasHeight,s=a.scrollOptions,y=a.categories,f=y.startX,g=y.endX-f,v=s.flatScrollBars,n={hcJSON:{categories:{scroll:{}}}},r=c.dataset,C=c.datalabels,l=c.ganttTracker,t=c.ganttHeaderLayer,D=b.logic.chartInstance&&b.logic.chartInstance.jsVars._reflowData||
{},m=a.chart,h=c.gridLayer,x=(f=a.dataTable)&&f.processHeader,w=b.canvasLeft,Q=b.canvasWidth,E=m.gridBorderThickness,G=m.totalGridWidth,X=Da(m.ganttStartX,G)+E,L=y.scroll,M=f&&f.__scrollOptions,N=a.verticalScroll,B={hcJSON:{dataTable:{__scrollOptions:{}},verticalScroll:{}}},Z=B.hcJSON.dataTable.__scrollOptions,H=x.totalPH,$=c.gridHeaderLayer,K=c.gridTracker,u,q,f=d(y.startX,m.ganttStartX),c=c.scroll=c.scroll||e.group("scroll").insertAfter(l);L.enabled&&(a=y.visibleW/g,L.scroller=e.scroller(f,p+k-
s.height,y.visibleW,s.height,!0,{showButtons:s.showButtons,displayStyleFlat:v,buttonWidth:s.buttonWidth,scrollRatio:a,scrollPosition:L.startPercent},c).attr({"scroll-display-style":v,fill:s.color}).scroll(function(a){q=-va(a*(g-y.visibleW));r&&r.transform(["T",q,r.data("vOffset")]);C&&C.transform(["T",q,C.data("vOffset")]);l&&l.transform(["T",q,l.data("vOffset")]);t&&t.transform(["T",q,0]);r&&r.data("hOffset",q);C&&C.data("hOffset",q);l&&l.data("hOffset",q);n.hcJSON.categories.scroll.startPercent=
a;eb(D,n,!0)}),function(){var a;ka.eve.on("raphael.scroll.start."+L.scroller.id,function(c){a=c;ea.raiseEvent("scrollstart",{scrollPosition:c},b.logic.chartInstance)});ka.eve.on("raphael.scroll.end."+L.scroller.id,function(c){ea.raiseEvent("scrollend",{prevScrollPosition:a,scrollPosition:c},b.logic.chartInstance)})}(),L.startPercent&&(q=-va(L.startPercent*(g-y.visibleW)),r&&r.data("hOffset",q),C&&C.data("hOffset",q),l&&l.data("hOffset",q),t&&t.transform(["T",q,0]),r&&r.transform(["T",q,r.data("vOffset")]),
C&&C.transform(["T",q,r.data("vOffset")]),l&&l.transform(["T",q,r.data("vOffset")])));M.enabled&&(M.scroller=e.scroller(w,p+k-s.height,X,s.height,!0,{showButtons:s.showButtons,displayStyleFlat:v,buttonWidth:s.buttonWidth,scrollRatio:X/G,scrollPosition:M.startPercent},c).attr({"scroll-display-style":v,fill:s.color}).scroll(function(a){q=-va(a*(G-X));h&&h.transform(["T",q,h.data("vOffset")]);$&&$.transform(["T",q,0]);K&&K.transform(["T",q,K.data("vOffset")]);h.data("hOffset",q);$.data("hOffset",q);
K.data("hOffset",q);Z.startPercent=a;eb(D,B,!0)}),function(){var a;ka.eve.on("raphael.scroll.start."+M.scroller.id,function(c){a=c;ea.raiseEvent("scrollstart",{scrollPosition:c},b.logic.chartInstance)});ka.eve.on("raphael.scroll.end."+M.scroller.id,function(c){ea.raiseEvent("scrollend",{prevScrollPosition:a,scrollPosition:c},b.logic.chartInstance)})}(),M.startPercent&&(q=-va(M.startPercent*(G-X)),h&&h.transform(["T",q,0]),K&&K.transform(["T",q,0]),$&&$.transform(["T",q,0]),h.data("hOffset",q),K.data("hOffset",
q)));N.enabled&&(u=m.processHeight-x.dimension.h,N.scroller=e.scroller(w+Q-s.height,p+x.dimension.h,s.height,m.processHeight-x.dimension.h,!1,{showButtons:s.showButtons,displayStyleFlat:v,buttonWidth:s.buttonWidth,scrollRatio:u/H,scrollPosition:N.startPercent},c).attr({"scroll-display-style":v,fill:s.color}).scroll(function(a){q=-va(a*(H-u));h&&h.transform(["T",h.data("hOffset"),q]);r&&r.transform(["T",r.data("hOffset"),q]);C&&C.transform(["T",C.data("hOffset"),q]);l&&l.transform(["T",l.data("hOffset"),
q]);K&&K.transform(["T",K.data("hOffset"),q]);h.data("vOffset",q);K.data("vOffset",q);r.data("vOffset",q);l.data("vOffset",q);C.data("vOffset",q);B.hcJSON.verticalScroll.startPercent=a;eb(D,B,!0)}),function(){var a;ka.eve.on("raphael.scroll.start."+N.scroller.id,function(c){a=c;ea.raiseEvent("scrollstart",{scrollPosition:c},b.logic.chartInstance)});ka.eve.on("raphael.scroll.end."+N.scroller.id,function(c){ea.raiseEvent("scrollend",{prevScrollPosition:a,scrollPosition:c},b.logic.chartInstance)})}(),
N.startPercent&&(q=-va(N.startPercent*(H-u)),h&&h.transform(["T",h.data("hOffset"),q]),r&&r.transform(["T",r.data("hOffset"),q]),C&&C.transform(["T",C.data("hOffset"),q]),l&&l.transform(["T",l.data("hOffset"),q]),K&&K.transform(["T",K.data("hOffset"),q]),h.data("vOffset",q),K.data("vOffset",q),r.data("vOffset",q),C.data("vOffset",q),l.data("vOffset",q)))},finalizeScrollPlots:function(){var b=this,a=b.options,d=b.canvasTop,c=a.categories,e=c.endX,k=c.startX,s=c.scroll,y=a.chart,f=a.dataTable,g=f&&
f.processHeader,v=b.canvasLeft,n=y.gridBorderThickness,r=y.totalGridWidth,C=Da(y.ganttStartX,r)+n,l,t,D,m,h,x=e-k-c.visibleW,e=b.container,w=f&&f.__scrollOptions,Q=a.verticalScroll,U=g.totalPH,G=y.processHeight-g.dimension.h,X,L,M,N,B,s=c.scroll,a=function(a){var e=b.elements.canvas,f=N.left,n=N.top,p=a.type,q=sb&&E.getTouchEvent(a)||kc,f=a.layerX||q.layerX||(a.pageX||q.pageX)-f;a=a.layerY||q.layerY||(a.pageY||q.pageY)-n;switch(p){case "dragstart":B=e.isPointInside(f,a);X=f>k&&f<k+c.visibleW;M=f>
v&&f<k+c.visibleW&&a>d+g.dimension.h;L=f<k;l=B&&f||null;t=B&&a||null;break;case "dragend":B=!1;h=m=D=t=l=void 0;break;default:if(!B||b.trackerClicked)break;e=f-l;p=a-t;l=f;t=a;X&&s&&s.scroller&&(D=s.scroller.attrs["scroll-position"]-e/x,s.scroller.attr({"scroll-position":D}));M&&Q&&Q.scroller&&(m=Q.scroller.attrs["scroll-position"]-p/(U-G),Q.scroller.attr({"scroll-position":m}));L&&w&&w.scroller&&(h=w.scroller.attrs["scroll-position"]-e/(r-C),w.scroller.attr({"scroll-position":h}))}};sb&&(N=E.getPosition(e),
e&&(mc(e,"dragstart drag dragend",a),lc(e,"dragstart drag dragend",a)))},gridHoverHandler:function(){var b=this.data("data"),a=b.gridObj,d=!!a.prevRow,c={};if(!a.isHeader)if(b.x&&(c.x=b.x),b.y&&(c.y=b.y),b.width&&(c.width=b.width),b.height&&(c.height=b.height),a.hoverColor&&(c.fill=a.hoverColor),a.usePlotHover&&b.hoverEle.attr(c).show(),b.useNext&&a.useHover){for(;a&&d;)a=a.prevRow,d=!!a.prevRow;for(;a;)a.items.background.attr("fill",a.hoverColor),a=a.nextRow}else a.useHover&&a.items.background.attr("fill",
a.hoverColor)},gridOutHandler:function(){var b=this.data("data"),a=b.gridObj,d=!!a.prevRow;if(!a.isHeader)if(a.usePlotHover&&b.hoverEle.hide(),b.useNext&&a.useHover){for(;a&&d;)a=a.prevRow,d=!!a.prevRow;for(;a;)a.items.background.attr("fill",a.bgColor||Ma),a=a.nextRow}else a.useHover&&a.items.background.attr("fill",a.bgColor)},drawAxes:function(){if(this.options.dataTable){Pa["renderer.cartesian"].drawAxes.call(this,arguments);var b=this.options,a=b.chart,e=this.paper,c=this.layers,p=c.layerBelowDataset,
k=c.layerAboveDataset,s=c.gridLayer,y=c.dataset,f=b.dataTable,g=b.categories,f=f&&f.processHeader,v=this.canvasTop,y=this.canvasLeft,s=a.gridBorderThickness,n=Da(a.ganttStartX,a.totalGridWidth)+s,r=f.dimension,C=r.h,r=a.processHeight-r.h,l=d(g.startX,a.ganttStartX),g=g.visibleW,a=.5*a.ganttLineThickness,s=.5*s,s=c.gridLayer=c.gridLayer||e.group("grid",p).attr({"clip-rect":[y,v+C+s,n,r-s]});c.gridHeaderLayer=c.gridHeaderLayer||e.group("grid-header",p).attr({"clip-rect":[y,v,n,C+r]});p=c.gridTracker=
c.gridTracker||e.group("grid-tracker",p).attr({"clip-rect":[y,v,n,C+r]});s.data("vOffset",0);s.data("hOffset",0);p.data("vOffset",0);p.data("hOffset",0);c.ganttHeaderLayer=c.ganttHeaderLayer||e.group("gantt",k).attr({"clip-rect":[l,v,g+(b.verticalScroll.enabled?b.scrollOptions.height:0),this.chartHeight]});y=c.dataset.attr({"clip-rect":[l,v+C-a,g,r+a]});b=c.datalabels.attr({"clip-rect":[l,v+C-a-10,g,r+a+10]});e=c.ganttTracker=e.group("gantt-hot",c.tracker).attr({"clip-rect":[l,v+C-a,g,r+a]});y.data("vOffset",
0);y.data("hOffset",0);b.data("vOffset",0);b.data("hOffset",0);e.data("vOffset",0);for(e.data("hOffset",0);f;)this.drawProcess(f),f=f.nextRow;this.drawCategories()}},drawPlotGantt:function(b){var a=this,I=a.options,c=I.chart,p=a.paper,k=a.layers,s=b.data,y=b.items,f=s.length,g=k.dataset,v=k.datalabels,n=I.dataTable,r=n.processHeader,C=I.categories,l=C.axis,t=a.canvasTop,D=c.taskBarRoundRadius,f=I.plotOptions.series,m=isNaN(+f.animation)&&f.animation.duration||1E3*f.animation,h=I.tasksMap||(I.tasksMap=
{}),x=I.milestone,w=I.trendlines,E=r.dimension.h,ca=c.taskDatePadding,G,X,L,M,N,B,Z,H,$,K,u,q,T,aa,ea,W,ha,A,R,ba,F;b.graphics=[];ea=g.shadows||(g.shadows=p.group("shadows",g));f=w&&w.length;for(b=0;b<f;b+=1)u=w[b],u.end||(u.end=u.start),u.end&&(R=l.getPixel(u.start),W=l.getPixel(u.end),ba=u.thickness,I=u.items||(u.items={}),G=void 0,u.isTrendZone?(K=["M",R+.5*(W-R),t+E,"v",t+r.totalPH],ba=W-R):(K=["M",R,t+E,"L",W,t+E+r.totalPH],G=u.dashedStyle),I.trendLine=p.path(K,g).attr({stroke:u.color,"stroke-width":ba,
"stroke-dasharray":G}),Sa(u.displayValue)&&""!==u.displayValue&&(I.label=p.text(k.ganttHeaderLayer).attr({text:u.displayValue,x:K[1],y:0}).css(u.style),G=I.label._getBBox().height,u=t+c.processHeight+(!C.scroll.enabled||c.marginBottom<G?.5*G:-(.5*G)-5),I.label.attr("y",u)));v.hide();k=function(){v.show()};w=r=function(b){U.call(this,a,b)};C=function(b){U.call(this,a,b,"DataPlotRollOver")};t=function(b){U.call(this,a,b,"DataPlotRollOut")};E=function(b){b&&b.click(function(b){U.call(this,a,b)}).hover(function(b){var c=
this.data("dataObj");U.call(this,a,b,"DataPlotRollOver");c.showHoverEffect&&a.taskHoverHandler.call(this,a)},function(b){var c=this.data("dataObj");U.call(this,a,b,"DataPlotRollOut");c.showHoverEffect&&a.taskHoverOutHandler.call(this,a)}).data("dataObj",A).data("eventArgs",X)};f=s.length;for(b=0;b<f;b+=1)A=s[b],I=A.processId,u=n[I],W=ha=A.color,I=A.items||(A.items={}),K=A.animation?m||1E3:0,u&&(F=A.borderThickness,R=va(l.getPixel(A.start)),ba=ac(M=l.getPixel(A.end)-R),R&&ba&&(L=u.dimension.h,u=u.yPos-
L,G=L*(/%/g.test(A.height)&&.01*Gb(A.height,10))||d(A.height,L),q=L*(/%/g.test(A.topPadding)&&.01*Gb(A.topPadding,10))||d(A.topPadding,L),u+=Da(q,L-G),aa=.5*G,T=A.toolText,q=A.link,(L=y[b])||(L=y[b]={index:b,dataLabel:null,start:A.start,end:A.end,startLabel:null,endLabel:null,tracker:null}),A.index=b,N=e(A.id,b),""!==N&&h[N]&&(h[N].items=L,h[N].x=R,h[N].y=u,h[N].h=G,h[N].w=ba),M=N=B=Z=H=$=null,A.showAsGroup?(K?(M=p.path(["M",R,u],g),M.animate({path:["M",R,u,"v",G,"L",R+aa,u+aa,"H",R+ba-aa,"L",R+ba,
u+G,"v",-G,"H",R]},K,"normal",k)):(M=p.path(["M",R,u,"v",G,"L",R+aa,u+aa,"H",R+ba-aa,"L",R+ba,u+G,"v",-G,"H",R],g),k&&k()),M.attr({fill:W,stroke:A.borderColor,cursor:q?"pointer":"",ishot:!0,"stroke-width":A.borderThickness}).tooltip(T).shadow(c.shadow&&A.shadow,ea)):(-1!==A.percentComplete&&(M=ba*A.percentComplete*.01,W=Ma,N=I.taskFill=p.rect(R,u,0,G,0,g).attr({fill:ha,cursor:q?"pointer":"",ishot:!0,"stroke-width":0,width:K?0:M||1}).tooltip(T),K&&N.animate({width:M||1},K,"normal"),B=p.rect(R,u,0,
G,0,g).attr({fill:A.slackColor,cursor:q?"pointer":"",ishot:!0,"stroke-width":0,x:K?R:R+M||1,width:K?0:ba-M||1}).tooltip(T),K&&B.animate({x:R+M||1,width:ba-M||1},K,"normal")),I=ka.crispBound(R,u,ba,G,F),M=p.rect(I.x,I.y,0,I.height,D,g).attr({fill:W,stroke:A.borderColor,cursor:q?"pointer":"",ishot:!0,"stroke-width":A.borderThickness,width:K?0:I.width||1}).tooltip(T).shadow(c.shadow&&A.shadow,ea),K?M.animate({width:I.width||1},K,"normal",k):k&&k()),Sa(A.label)&&""!==A.label&&(I=A.labelAlign,Z=p.text().attr({text:A.label,
x:R+ba*gb[I]+Ua[I],"text-anchor":Ta[I],cursor:q?"pointer":"",ishot:!0,y:u-.5*Ra(A.style.lineHeight,10)-c.taskLabelPadding}).css(A.style),v.appendChild(Z)),Sa(A.startDate)&&""!==A.startDate&&(H=p.text().attr({text:A.startDate,x:R-2-ca,y:u+.5*G,cursor:q?"pointer":"",ishot:!0,"text-anchor":"end"}).css(A.style),v.appendChild(H)),Sa(A.endDate)&&""!==A.endDate&&($=p.text().attr({text:A.endDate,x:R+ba+2+ca,y:u+.5*G,cursor:q?"pointer":"",ishot:!0,"text-anchor":"start"}).css(A.style),v.appendChild($)),L.graphic=
M,L.percentCompleteGraphic=N,L.slackGraphic=B,L.dataLabel=Z,L.startLabel=H,L.endLabel=$,X={processId:A.processId,taskId:A.id,start:A._start,end:A._end,showAsGroup:A.showAsGroup,link:A.link,sourceType:"task",percentComplete:-1!==A.percentComplete&&A.percentComplete},N&&N.click(r).hover(C,t).data("eventArgs",X),B&&B.click(w).data("eventArgs",X),Qa([M,Z,H,$],E)));y=function(b){U.call(this,a,b,"MilestoneClick")};n=function(b){var c=this.data("dataObj");U.call(this,a,b,"MilestoneRollOver");c.showHoverEffect&&
c.items.graphic.attr({fill:c.hoverFillColor,stroke:c.hoverBorderColor,"fill-opacity":c.hoverFillAlpha,"stroke-opacity":c.hoverBorderAlpha})};D=function(b){var c=this.data("dataObj");U.call(this,a,b,"MilestoneRollOut");c.showHoverEffect&&c.items.graphic.attr({fill:c.fillColor,stroke:c.borderColor,"fill-opacity":c.fillAlpha,"stroke-opacity":c.borderAlpha})};this.drawConnectors();I=null;f=x&&x.length;for(b=0;b<f;b+=1)c=x[b],u=h[c.taskId],I=c.items||(c.items={}),u&&(s=ka.animation({"fill-opacity":c.fillAlpha,
"stroke-opacity":c.borderAlpha},m,"normal"),X={sides:c.sides,date:c.origDate,radius:c.radius,taskId:c.taskId,toolText:c.toolText,link:c.link,numSides:c.numSides},I.graphic=p.polypath(c.numSides,l.getPixel(c.date.ms),u.y+.5*u.h,d(c.radius,.6*u.h),c.startAngle,c.depth,g).attr({fill:c.fillColor,"fill-opacity":m?0:c.fillAlpha,stroke:c.borderColor,"stroke-opacity":m?0:c.borderAlpha,groupId:"gId"+b,ishot:!0,cursor:c.link?"pointer":"","stroke-width":c.borderThickness}).tooltip(c.toolText).click(y).data("eventArgs",
X).data("dataObj",c),I.label=p.text().attr({text:c.displayValue,x:l.getPixel(c.date.ms),y:u.y+.5*u.h,groupId:"gId"+b,cursor:c.link?"pointer":"",ishot:!0,"text-anchor":"middle"}).css(c.style).tooltip(c.toolText).click(y).data("eventArgs",X).data("dataObj",c),v.appendChild(I.label),m&&I.graphic.animate(s.delay(m)),I.graphic.hover(n,D),I.label.hover(n,D))},taskHoverOutHandler:function(b){var a=b.options.tasksMap;b=this.data("dataObj");var a=a[e(b.id,b.index)].items,d={fill:b.color,stroke:b.borderColor,
"stroke-width":b.borderThickness,"stroke-dasharray":b.dashedStyle};-1===b.percentComplete||b.showAsGroup||(a.slackGraphic.attr({fill:b.slackColor}),a.percentCompleteGraphic.attr({fill:b.color}),delete d.fill);a.graphic.attr(d)},taskHoverHandler:function(b){var a=b.options.tasksMap;b=this.data("dataObj");var a=a[e(b.id,b.index)].items,d={fill:b.hoverFillColor,stroke:b.hoverBorderColor};-1===b.percentComplete||b.showAsGroup||(a.slackGraphic.attr({fill:b.slackHoverColor}),a.percentCompleteGraphic.attr({fill:b.hoverFillColor}),
delete d.fill);a.graphic.attr(d)},drawConnectors:function(){var b=this,a=b.paper,d=b.options,c=d.chart.connectorExtension,e=d.connectors,k=d.tasksMap,s=e.length,y=b.layers.dataset,f=[],d=d.plotOptions.series,d=isNaN(+d.animation)&&d.animation.duration||1E3*d.animation,g,v,n,r,C,l,t,D,m,h,x,w,E,T,G;E=function(a){U.call(this,b,a,"ConnectorClick")};T=function(a){var c=this.data("dataObj"),d=k[c.fromTaskId],e=k[c.toTaskId],f={stroke:c.hoverColor,"stroke-dasharray":c.dashedStyle,"stroke-width":c.hoverThickness};
U.call(this,b,a,"ConnectorRollOver");c.showHoverEffect&&(Qa([d,e],function(a){var b={fill:a.dataObj.hoverFillColor,stroke:a.dataObj.hoverBorderColor};-1===a.dataObj.percentComplete||a.dataObj.showAsGroup||(a.items.slackGraphic.attr({fill:a.dataObj.slackHoverColor}),a.items.percentCompleteGraphic.attr({fill:a.dataObj.hoverFillColor,stroke:a.dataObj.hoverBorderColor}),delete b.fill);a.items.graphic.attr(b)}),c.items.connector.attr(f))};G=function(a){var c=this.data("dataObj"),d=k[c.fromTaskId],e=k[c.toTaskId],
f={stroke:c.color,"stroke-width":c.thickness,"stroke-dasharray":c.dashedStyle};U.call(this,b,a,"ConnectorRollOut");c.showHoverEffect&&(Qa([d,e],function(a){var b={fill:a.dataObj.color,stroke:a.dataObj.borderColor,"stroke-width":a.dataObj.borderThickness,"stroke-dasharray":a.dataObj.dashedStyle};-1===a.dataObj.percentComplete||a.dataObj.showAsGroup||(a.items.slackGraphic.attr({fill:a.dataObj.slackColor}),a.items.percentCompleteGraphic.attr({fill:a.dataObj.color}),delete b.fill);a.items.graphic.attr(b)}),
c.items.connector.attr(f))};for(g=0;g<=s;g+=1)if(n=e[g]||{},l=n.fromTaskId,r=n.toTaskId,v=k[l],m=k[r],r=n.items||(n.items={}),v&&m){h=v.y+.5*v.h;x=m.y+.5*m.h;C=h==x;l=v.x;t=v.x+v.w;D=m.x;m=m.x+m.w;w=w=0;0===n.fromTaskConnectStart&&1===n.toTaskConnectStart&&(w=1);0===n.fromTaskConnectStart&&0===n.toTaskConnectStart&&(w=2);1===n.fromTaskConnectStart&&1===n.toTaskConnectStart&&(w=3);1===n.fromTaskConnectStart&&0===n.toTaskConnectStart&&(w=4);if(C)switch(v=v.height,w){case 1:w=(D-t)/10;f=["M",t,h,t+w,
h,"L",t+w,h,t+w,h-v,"L",t+w,h-v,D-w,h-v,"L",D-w,h-v,D-w,h,"L",D-w,h,D,x,"L",m+c,x,m,x];break;case 2:f=["M",t,h,t+c,h,"L",t+c,h,t+c,h-v,"L",t+c,h-v,m+c,h-v,"L",m+c,x-v,m+c,x];break;case 3:f=["M",l,h,l-c,h,"L",l-c,h,l-c,h-v,"L",l-c,h-v,D-c,h-v,"L",D-c,h-v,D-c,h,"L",D-c,h,D,h];break;case 4:f=["M",l,h,l-c,h,"L",l-c,h,l-c,h-v,"L",l-c,h-v,m+c,h-v,"L",m+c,h-v,m+c,h,"L",m+c,h,m,h]}else switch(w){case 1:f=["M",t,h,t+(D-t)/2,h,"L",t+(D-t)/2,h,t+(D-t)/2,x,"L",t+(D-t)/2,x,D,x];f=t<=D?["M",t,h,t+(D-t)/2,h,"L",
t+(D-t)/2,h,t+(D-t)/2,x,"L",t+(D-t)/2,x,D,x]:["M",t,h,t+c,h,"L",t+c,h,t+c,h+(x-h)/2,"L",t+c,h+(x-h)/2,D-c,h+(x-h)/2,"L",D-c,h+(x-h)/2,D-c,x,"L",D-c,x,D,x];break;case 2:w=0>m-t?0:m-t;f=["M",t,h,t+c+w,h,"L",t+c+w,h,t+c+w,x,"L",t+c+w,x,m,x];break;case 3:w=0>l-D?0:l-D;f=["M",l,h,l-c-w,h,"L",l-c-w,h,l-c-w,x,"L",l-c-w,x,D,x];break;case 4:f=l>m?["M",l,h,l-(l-m)/2,h,"L",l-(l-m)/2,h,l-(l-m)/2,x,"L",l-(l-m)/2,x,m,x]:["M",l,h,l-c,h,"L",l-c,h,l-c,h+(x-h)/2,"L",l-c,h+(x-h)/2,m+c,h+(x-h)/2,"L",m+c,h+(x-h)/2,m+
c,x,"L",m+c,x,m,x]}r.connector?r.connector.animate({path:f}):(l=ka.animation({"stroke-opacity":n.alpha},d,"normal"),r.connector=a.path(f,y).attr({stroke:n.color,"stroke-opacity":0,"stroke-width":n.thickness,"stroke-dasharray":n.dashedStyle}).animate(l.delay(d)));l={fromTaskId:n.fromTaskId,toTaskId:n.toTaskId,fromTaskConnectStart:n.fromTaskConnectStart,toTaskConnectStart:n.toTaskConnectStart,link:n.link,sourceType:"connector"};r.tracker=a.path(f,y).attr({stroke:Ma,"stroke-width":W(n.thickness,10),
ishot:!0,cursor:n.link?"pointer":""}).data("dataObj",n).data("eventArgs",l).click(E);r.tracker.hover(T,G)}}},Pa["renderer.cartesian"])}]);
