if(!_.pert){_.pert=1;(function($){var qga=function(a){return $.ij(pga,a,"circle")},iW=function(){$.Wp.call(this);this.Ub=this.$=this.mL=this.fb=null;$.R(this.xa,[["color",0,8192]]);var a={};$.R(a,[["fill",0,8192],["stroke",0,8192],["labels",0,0]]);this.ca=new $.Ew(this,a,$.Wk);this.ca.pa("labelsFactoryConstructor",$.Gw);this.ca.pa("labelsAfterInitCallback",this.wC);this.ya=new $.Ew(this,a,$.ln);this.ya.pa("labelsFactoryConstructor",$.Gw);this.ya.pa("labelsAfterInitCallback",this.wC);this.Da=new $.Ew(this,a,$.mn);this.Da.pa("labelsFactoryConstructor",
$.Gw);this.Da.pa("labelsAfterInitCallback",this.wC)},jW=function(a){var b=a.Ya().F(),c=a.Ya().i("titleFormat");a=a.Ya().i("format");c&&c!=$.Un&&(b.titleFormat=c);a&&a!=$.Un&&(b.format=a);return b},kW=function(){iW.call(this);this.Ia("milestones");$.R(this.xa,[["size",0,1],["shape",0,1]])},lW=function(){iW.call(this);this.Ia("tasks");$.Mw(this.ca,[["dummyFill",0,8192],["dummyStroke",0,8192],["lowerLabels",0,0],["upperLabels",0,0]]);this.ca.pa("lowerLabelsAfterInitCallback",this.wC);this.ya.pa("lowerLabelsAfterInitCallback",
this.wC);this.Da.pa("lowerLabelsAfterInitCallback",this.wC)},mW=function(){$.Wp.call(this);this.Ia("criticalPath");this.Xk=this.Rk=null},nW=function(){$.Wv.call(this);this.Ia("pert");this.na=null;this.b={};this.g={};this.f=[];this.Sb=[];this.Ma=[];this.Ea=this.ba=this.o=null;this.ga=[];this.D={};this.Ja=this.Xk=this.Rk=this.la=this.vh=this.Za=this.eb=this.U=this.va=null;this.P=[];this.N=[];this.G={};this.Ka=[];this.Uc=this.rb=0;this.mc=[];this.fb=this.yc=null;$.Qs(this,this,this.cg,this.rg,this.H$,
this.cg,null,this.dj);$.R(this.xa,[["expectedTimeCalculator",8192,1],["verticalSpacing",4,1],["horizontalSpacing",4,1]])},oW=function(a,b,c){var d=a.Ya(),e=!0;$.da(a.yc.enabled)&&(e=a.yc.enabled);d.K(a.yc);b&&$.da(b.enabled)&&(e=b.enabled);d.K(b);c&&$.da(c.enabled)&&(e=c.enabled);d.K(c);d.enabled(e)},rga=function(a){var b={type:"pointsselect",selectedTasks:[],selectedMilestones:[]},c;for(c=0;c<a.P.length;c++){var d=a.P[c],e=a.g[d.id];d={item:d.item,name:d.item.get("name"),successors:d.Ci,predecessors:d.Vj,
earliestStart:e.CQ,earliestFinish:e.gz,latestStart:e.qL,latestFinish:e.XS,duration:e.duration,slack:e.KM,variance:e.xV};b.selectedTasks.push(d)}for(c=0;c<a.N.length;c++)d=a.N[c],e={successors:d.Ci,predecessors:d.Vj,isCritical:d.Pe,isStart:d.Dx},d.QE&&(e.creator=d.QE.item),b.selectedMilestones.push(e);return b},qW=function(a){a.g={};if(a.Sb.length&&a.Ma.length)for(var b=0;b<a.Sb.length;b++)pW(a,String(a.Sb[b].get("id")));b=0;for(var c in a.g){var d=a.g[c];d.KM||(b+=d.xV)}a.Fa("pertChartCriticalPathStandardDeviation",
Math.sqrt(b));a.I(8192)},pW=function(a,b){var c=a.b[b];if(!(b in a.g)){a.g[b]={};var d=Number(c.item.get("optimistic")),e=Number(c.item.get("pessimistic"));a.g[b].xV=$.Kl(Math.pow((e-d)/6,2),3)}d=a.g[b];$.p(d.duration)||(e=a.Ec(!1,c,d),d.duration=$.Kl(a.i("expectedTimeCalculator").call(e,e),3));e=d.duration;var f;if(!$.p(d.CQ)){var h=0;for(f=0;f<c.Vj.length;f++){var k=String(c.Vj[f].get("id")),l=a.g[k];$.p(l)&&$.p(l.gz)||pW(a,k);h=Math.max(h,a.g[k].gz)}d.CQ=$.Kl(h,3);d.gz=$.Kl(h+e,3)}if(!$.p(d.XS)){if(c.Ci.length)for(h=
window.Infinity,f=0;f<c.Ci.length;f++)k=String(c.Ci[f].get("id")),l=a.g[k],$.p(l)&&$.p(l.qL)||pW(a,k),h=Math.min(h,a.g[k].qL);else{h=-window.Infinity;for(f=0;f<a.Ma.length;f++)c=String(a.Ma[f].get("id")),k=a.g[c],$.p(k)&&$.p(k.gz)||pW(a,c),h=Math.max(h,a.g[c].gz);a.Fa("pertChartProjectDuration",h)}d.XS=$.Kl(h,3);d.qL=$.Kl(h-e,3);d.KM=$.Kl(h-d.gz,3)}},rW=function(a,b){a!=b&&($.za(a.Mq,b),$.za(b.Yl,a))},sW=function(a,b,c,d){b={label:d||"",id:"",Ci:[],Vj:[],Yl:[],Mq:[],level:-1,Pe:!1,left:0,top:0,Dx:c,
QE:b,Um:!1,om:!1,Mi:[],index:-1};c="m"+$.oa(b);a.D[c]=b;b.id=c;return b},tW=function(a,b,c){var d={from:b,uf:c,Um:!1,om:!1,ky:null,id:"",Pe:!1},e="e"+$.oa(d);d.id=e;a.G[e]=d;$.za(b.Mi,d);$.za(c.Mi,d);return d},uW=function(a,b){var c,d,e=[];for(c in a.G){var f=a.G[c];if(!f.om&&f.Um==b){f.Um=!b;var h={TH:{},Mi:{}};h.TH[f.from.id]=f.from;h.TH[f.uf.id]=f.uf;h.Mi[f.id]=f;var k=[];f.from.om||f.from.Um!=b||(f.from.Um=!b,k.push(f.from));f.uf.om||f.uf.Um!=b||(f.uf.Um=!b,k.push(f.uf));for(;k.length;){var l=
k.pop();for(d=0;d<l.Mi.length;d++)if(f=l.Mi[d],!f.om&&f.Um==b){f.Um=!b;h.Mi[f.id]=f;var m=f.from==l?f.uf:f.from;m.om||m.Um!=b||(m.Um=!b,k.push(m));h.TH[m.id]=m}}e.push(h)}f.Um=!b}for(c in a.D)a.D[c].Um=!b;return e},sga=function(a,b){var c,d,e,f=null,h=window.Infinity;for(c=0;c<a.length;c++){var k=a[c],l=0,m=-1;for(d=0;d<b.length;d++){var n=b[d],q=!0;for(e in k.TH){var r=k.TH[e];if(r.om&&0>n.indexOf(r)){q=!1;break}}if(q&&(l++,0>m&&(m=d),l>=h))break}if(!l)throw"non planar!";l<h&&(f=[c,m],h=l)}return f},
vW=function(a,b,c,d){var e=Math.atan((d-b)/(c-a)),f=Math.atan(.3);a=$.Wl(0,0,3,10);b=e-f;e+=f;return[c-a*Math.cos(b),d-a*Math.sin(b),c-a*Math.cos(e),d-a*Math.sin(e)]},wW=function(a,b){return $.da(a.enabled())?a.enabled():b},xW=function(){var a=new nW;a.ja(!0,$.cl("pert"));return a},pga={KN:"circle",Lka:"rhombus",Z4:"rectangle"};$.H(iW,$.Wp);$.rp(iW,["fill","stroke","labels"],"normal");iW.prototype.ra=$.Wp.prototype.ra|28672;iW.prototype.qa=$.Wp.prototype.qa;var yW={};$.dp(yW,1,"color",$.yp);
$.S(iW,yW);$.g=iW.prototype;$.g.i=$.Vp;$.g.GF=function(a){var b=this.parent();return b?b[a&$.mn?"selected":a&$.ln?"hovered":"normal"]():null};$.g.dg=function(a){$.p(a)&&(this.Ub=a);return this.Ub};$.g.Og=$.Up;$.g.Sd=function(){var a=[this.ma];this.$&&(a=$.Fa(a,this.$.Sd()));return a};$.g.Rd=function(){var a=[this.La];this.$&&(a=$.Fa(a,this.$.Rd()));return a};
$.g.parent=function(a){return $.p(a)?(this.$!=a&&(null===a?($.Xp(this.$,this.Nc,this),this.$=null):(this.$&&$.Xp(this.$,this.Nc,this),this.$=a,this.Ya().Me().parent(this.$.Ya()),$.L(this.$,this.Nc,this))),this):this.$};$.g.Nc=function(a){var b=0,c=0;$.W(a,1)&&(b|=16,c|=1);$.W(a,8)&&(b|=4,c|=8);$.W(a,32768)&&(b|=1,c|=1);this.Ub=null;this.u(b,c)};$.g.Ta=function(a){return $.p(a)?(this.ca.K(a),this):this.ca};$.g.lb=function(a){return $.p(a)?(this.ya.K(a),this):this.ya};
$.g.selected=function(a){return $.p(a)?(this.Da.K(a),this):this.Da};$.g.cv=function(a,b){return this.Ux("fill",a,b)};$.g.zq=function(a,b){return this.Ux("stroke",a,b)};$.g.Ux=function(a,b,c){a=(0==b?this.ca:1==b?this.ya:this.Da).i(a);$.E(a)&&(c.sourceColor=this.i("color"),a=a.call(c));return a};$.g.wC=function(a){$.L(a,this.Kq,this)};$.g.Kq=function(){this.ua(4096)};
$.g.Ya=function(a){this.fb||(this.fb=new $.Ru(0),$.V(this,"tooltip",this.fb),$.L(this.fb,this.Po,this));return $.p(a)?(this.fb.K(a),this):this.fb};$.g.Po=function(){this.ua(16384)};$.g.Jz=function(a){return $.p(a)?(this.mL!=a&&(this.mL=a,this.ca.labels().O(this.mL)),this):this.mL};$.g.Ki=function(){this.ca.labels().X();return this};$.g.eJ=function(){this.ca.labels().clear();return this};
$.g.F=function(){var a=iW.B.F.call(this);$.Bp(this,yW,a,"Pert visual element");a.normal=this.ca.F();a.hovered=this.ya.F();a.selected=this.Da.F();a.tooltip=this.Ya().F();return a};$.g.Y=function(a,b){iW.B.Y.call(this,a,b);$.tp(this,yW,a);this.ca.ja(!!b,a);this.ca.ja(!!b,a.normal);this.ya.ja(!!b,a.hovered);this.Da.ja(!!b,a.selected);"tooltip"in a&&this.Ya().ja(!!b,a.tooltip)};$.g.R=function(){$.jd(this.fb);iW.B.R.call(this)};var zW=iW.prototype;zW.tooltip=zW.Ya;zW.normal=zW.Ta;zW.hovered=zW.lb;
zW.selected=zW.selected;$.H(kW,iW);kW.prototype.ra=iW.prototype.ra|1;var AW=function(){var a={};$.ep(a,[[0,"size",function(a){return $.on(a,80)||0}],[0,"shape",qga]]);return a}();$.S(kW,AW);kW.prototype.F=function(){var a=kW.B.F.call(this);$.Bp(this,AW,a);return a};kW.prototype.Y=function(a,b){kW.B.Y.call(this,a,b);$.tp(this,AW,a)};$.H(lW,iW);$.rp(lW,["dummyFill","dummyStroke","lowerLabels","upperLabels"],"normal");lW.prototype.ra=iW.prototype.ra;lW.prototype.Jz=function(a){lW.B.Jz.call(this,a);(a=lW.B.Jz.call(this))&&this.ca.Sj().O(a);return a};lW.prototype.Ki=function(){this.ca.Sj().X();return lW.B.Ki.call(this)};lW.prototype.eJ=function(){this.ca.Sj().clear();return lW.B.eJ.call(this)};$.H(mW,$.Wp);$.g=mW.prototype;$.g.ra=$.Wp.prototype.ra|12289;$.g.Mc=function(a){this.Rk||(this.Rk=new kW,$.V(this,"milestones",this.Rk));return $.p(a)?(this.Rk.K(a),this):this.Rk};$.g.ac=function(a){this.Xk||(this.Xk=new lW,$.V(this,"tasks",this.Xk));return $.p(a)?(this.Xk.K(a),this):this.Xk};$.g.F=function(){var a=mW.B.F.call(this);a.tasks=this.ac().F();a.milestones=this.Mc().F();return a};
$.g.Y=function(a,b){mW.B.Y.call(this,a,b);"milestones"in a&&this.Mc().Y(a.milestones,b);"tasks"in a&&this.ac().Y(a.tasks,b)};var BW=mW.prototype;BW.tasks=BW.ac;BW.milestones=BW.Mc;$.H(nW,$.Wv);$.g=nW.prototype;$.g.ra=$.Wv.prototype.ra;$.g.qa=$.Wv.prototype.qa|61440;$.g.Qa=function(){return"pert"};
$.g.Ec=function(a,b,c,d){if(!this.o||a)this.o=new $.$u;a={};var e=null;if(b){a.item={value:b.item,type:""};e=b.item;a.name={value:b.item.get("name"),type:"string"};var f=b.item.get("pessimistic");$.p(f)&&(a.pessimistic={value:+f,type:"number"});f=b.item.get("optimistic");$.p(f)&&(a.optimistic={value:+f,type:"number"});f=b.item.get("mostLikely");$.p(f)&&(a.mostLikely={value:+f,type:"number"});f=b.item.get("duration");$.p(f)&&(a.duration={value:+f,type:"number"});a.successors={value:b.Ci,type:""};a.predecessors=
{value:b.Vj,type:""};a.isCritical={value:b.Pe,type:"string"}}c&&(a.earliestStart={value:c.CQ,type:"number"},a.earliestFinish={value:c.gz,type:"number"},a.latestStart={value:c.qL,type:"number"},a.latestFinish={value:c.XS,type:"number"},$.p(a.duration)||(a.duration={value:c.duration,type:"number"}),a.slack={value:c.KM,type:"number"},a.variance={value:c.xV,type:"number"});d&&(a.successors={value:d.Ci,type:""},a.predecessors={value:d.Vj,type:""},a.isCritical={value:d.Pe,type:"string"},d.QE&&(a.creator=
{value:d.QE.item,type:""}),a.isStart={value:d.Dx,type:"string"},a.index={value:d.index,type:"number"});this.o.Vi([this]).lg(e);return $.Lt(this.o,a)};$.g.mJ=function(){var a=new $.Ru(0);a.za(this);$.L(a,this.Po,this);return a};$.g.Po=function(){this.Ya().X()};$.g.data=function(a,b,c){return $.p(a)?($.K(a,$.ys)||$.K(a,$.vs)?this.na!=a&&(this.na&&$.Xp(this.na,this.xd,this),this.na=a):(this.na&&$.Xp(this.na,this.xd,this),this.na=new $.ys(a,b,c)),$.L(this.na,this.xd,this),this.u(4352,1),this):this.na};
$.g.Tx=function(){this.ab().tq()&&this.u(-6145,9)};$.g.xd=function(){this.u(4356,1)};$.g.Nl=function(){return[]};$.g.Ne=function(){return[]};
$.g.cg=function(a){var b=a.domTarget,c=this.Ya();var d=b.tag;var e=!0;if(d)if(null!=d.m){var f=d.m;d=this.Ec(!0,void 0,void 0,f);var h=f.Pe?this.we().Mc():this.Mc();var k=f.Be?$.mn:$.ln;e=h.cv(k,d);h=h.zq(k,d);b.fill(e).stroke(h);e=!1;b=f.Pe?jW(this.we().Mc()):void 0;$.U(c);oW(this,jW(this.Mc()),b);$.iv(c,a.clientX,a.clientY,d);c.da(!0);if(a=f.jU)b=!0,c=this.Mc().Ta().labels(),a.gd(c.Gd()),b=wW(c,b),f.Be?(c=this.Mc().selected().labels(),a.gd(c.Gd()),b=wW(c,b)):(c=this.Mc().lb().labels(),a.gd(c.Gd()),
b=wW(c,b)),f.Pe&&(c=this.we().Mc().Ta().labels(),a.gd(c.Gd()),b=wW(c,b),f.Be?(c=this.we().Mc().selected().labels(),a.gd(c.Gd()),b=wW(c,b)):(c=this.we().Mc().lb().labels(),a.gd(c.Gd()),b=wW(c,b))),a.enabled(b),a.X()}else null!=d.w&&(f=d.w,b=this.g[f.id],d=this.Ec(!0,f,b,void 0),k=f.Be?$.mn:$.ln,h=f.Pe?this.we().ac():this.ac(),e=h.cv(k,d),h=h.zq(k,d),f.kU.stroke(h),f.EX.fill(e).stroke(h),h=f.tV,e=f.$S,h&&(b=!0,k=this.ac().Ta().fm(),h.gd(k.Gd()),b=wW(k,b),f.Be?(k=this.ac().selected().fm(),h.gd(k.Gd()),
b=wW(k,b)):(k=this.ac().lb().fm(),h.gd(k.Gd()),b=wW(k,b)),f.Pe&&(k=this.we().ac().Ta().fm(),h.gd(k.Gd()),b=wW(k,b),f.Be?(k=this.we().ac().selected().fm(),h.gd(k.Gd()),b=wW(k,b)):(k=this.we().ac().lb().fm(),h.gd(k.Gd()),b=wW(k,b))),h.enabled(b),h.X()),e&&(b=!0,h=this.ac().Ta().Sj(),e.gd(h.Gd()),b=wW(h,b),f.Be?(h=this.ac().selected().Sj(),e.gd(h.Gd()),b=wW(h,b)):(h=this.ac().lb().Sj(),e.gd(h.Gd()),b=wW(h,b)),f.Pe&&(h=this.we().ac().Ta().Sj(),e.gd(h.Gd()),b=wW(h,b),f.Be?(h=this.we().ac().selected().Sj(),
e.gd(h.Gd()),b=wW(h,b)):(h=this.we().ac().lb().Sj(),e.gd(h.Gd()),b=wW(h,b))),e.enabled(b),e.X()),e=!1,b=f.Pe?jW(this.we().ac()):void 0,$.U(c),oW(this,jW(this.ac()),b),$.iv(c,a.clientX,a.clientY,d),c.da(!0));e&&this.Ya().Wc()};
$.g.rg=function(a){var b=a.domTarget;if(a=b.tag)if(null!=a.m){var c=a.m;a=c.Pe?this.we().Mc():this.Mc();var d=this.Ec(!0,void 0,void 0,c);var e=c.Be?$.mn:$.Wk;var f=a.cv(e,d);d=a.zq(e,d);if(e=c.jU){a=!0;var h=this.Mc().Ta().labels();e.gd(h.Gd());a=wW(h,a);c.Be&&(h=this.Mc().selected().labels(),e.gd(h.Gd()),a=wW(h,a));c.Pe&&(h=this.we().Mc().Ta().labels(),e.gd(h.Gd()),a=wW(h,a),c.Be&&(c=this.we().Mc().selected().labels(),e.gd(c.Gd()),a=wW(c,a)));e.enabled(a);e.X()}b.fill(f).stroke(d)}else null!=a.w&&
(b=a.w,d=this.Ec(!0,b,this.g[b.id],void 0),e=b.Be?$.mn:$.Wk,a=b.Pe?this.we().ac():this.ac(),f=a.cv(e,d),d=a.zq(e,d),b.kU.stroke(d),b.EX.fill(f).stroke(d),c=b.tV,f=b.$S,c&&(a=!0,d=this.ac().Ta().fm(),c.gd(d.Gd()),a=wW(d,a),b.Be&&(d=this.ac().selected().fm(),c.gd(d.Gd()),a=wW(d,a)),b.Pe&&(d=this.we().ac().Ta().fm(),c.gd(d.Gd()),a=wW(d,a),b.Be&&(d=this.we().ac().selected().fm(),c.gd(d.Gd()),a=wW(d,a))),c.enabled(a),c.X()),f&&(a=!0,c=this.ac().Ta().Sj(),f.gd(c.Gd()),a=wW(c,a),b.Be&&(c=this.ac().selected().Sj(),
f.gd(c.Gd()),a=wW(c,a)),b.Pe&&(c=this.we().ac().Ta().Sj(),f.gd(c.Gd()),a=wW(c,a),b.Be&&(b=this.we().ac().selected().Sj(),f.gd(b.Gd()),a=wW(b,a))),f.enabled(a),f.X()))};
$.g.H$=function(a){var b=a.metaKey||a.ctrlKey,c,d,e=a.domTarget,f=e.tag;$.K(a.target,$.kt)&&(f=a.target.Wd(a.labelIndex).tag);if($.K(e,$.Jf)){f&&(null!=f.m?c=f.m:null!=f.w&&(d=f.w));if(c||d)if(b)c&&(c.Be=!c.Be,c.Be?$.za(this.N,c):$.Ea(this.N,c)),d&&(d.Be=!d.Be,d.Be?$.za(this.P,d):$.Ea(this.P,d));else{for(a=0;a<this.N.length;a++)this.N[a].Be=!1;for(a=0;a<this.P.length;a++)this.P[a].Be=!1;this.N.length=0;this.P.length=0;c&&(c.Be=!0,this.N.push(c));d&&(d.Be=!0,this.P.push(d))}else{for(a=0;a<this.N.length;a++)this.N[a].Be=
!1;for(a=0;a<this.P.length;a++)this.P[a].Be=!1;this.N.length=0;this.P.length=0}this.dispatchEvent(rga(this));this.u(32768,1)}};var CW=function(){var a={};$.dp(a,0,"expectedTimeCalculator",$.np);$.dp(a,0,"verticalSpacing",function(a){return $.on(a,20)});$.dp(a,0,"horizontalSpacing",function(a){return $.on(a,20)});return a}();$.S(nW,CW);$.g=nW.prototype;
$.g.mb=function(){if(this.J(4096)){this.b={};this.Sb.length=0;this.Ma.length=0;if(this.na&&!this.na.Ed){for(var a=this.na.mz(),b=0;b<a.length;b++){var c=a[b],d=String(c.get("id"));d in this.b||(this.b[d]={id:d,item:c,Ci:[],Vj:[],level:-1,Pe:!1,jQ:[],kQ:[]},this.Ma.push(c));var e=c.get("dependsOn");if($.p(e)&&"array"==$.ka(e))for(var f=0;f<e.length;f++){var h=String(e[f]);if(h in this.b)h!=d&&(this.b[h].Ci.push(c),this.b[d].Vj.push(this.b[h].item),$.Ea(this.Ma,this.b[h].item),$.Ta(this.b[h].kQ,d),
$.Ta(this.b[d].jQ,h));else{var k=this.na.Wo("id",h)[0];if(k){var l=String(k.get("id"));this.b[l]={id:l,item:k,Ci:[c],Vj:[],level:-1,Pe:!1,jQ:[],kQ:[]};$.Ea(this.Ma,k);this.b[d].Vj.push(k);$.Ta(this.b[l].kQ,d);$.Ta(this.b[d].jQ,h)}}}else this.Sb.push(c)}qW(this);this.ga.length=0;this.D={};this.Ea=sW(this,null,!0,"Start");this.Ea.Pe=!0;this.ba=sW(this,null,!1,"Finish");this.ba.Pe=!0;var m,n;for(n in this.b){var q=this.b[n],r=this.g[n];q.Xo||(q.Xo=sW(this,q,!0,"S"+q.item.get("name")));q.nm||(q.nm=sW(this,
q,!1,"F"+q.item.get("name")),q.nm.QE=q);$.za(q.Xo.Ci,q.item);$.za(q.nm.Vj,q.item);r.KM||(q.Pe=!0,q.Xo.Pe=!0,q.nm.Pe=!0);if(q.Ci.length)for(m=0;m<q.Ci.length;m++){var t=String(q.Ci[m].get("id")),u=this.b[t];u.Xo||(u.Xo=sW(this,u,!0,"S"+u.item.get("name")));u.nm||(u.nm=sW(this,u,!1,"F"+u.item.get("name")));rW(u.Xo,q.nm)}else rW(this.ba,q.nm);if(q.Vj.length)for(m=0;m<q.Vj.length;m++){var v=String(q.Vj[m].get("id")),w=this.b[v];w.Xo||(w.Xo=sW(this,w,!0,"Start: "+w.item.get("name")));w.nm||(w.nm=sW(this,
w,!1,"Finish: "+w.item.get("name")));rW(q.Xo,w.nm)}else rW(q.Xo,this.Ea)}var x,y,A,G=[];for(x in this.D){var C=this.D[x];var J={};for(y=0;y<C.Yl.length;y++){var P=C.Yl[y];if(1==P.Ci.length&&2>P.Mq.length&&!P.Vj.length){var Q=String(P.Ci[0].get("id"));var T=this.b[Q];var wa=T.nm;for(A=0;A<C.Yl.length;A++)if(y!=A){var Aa=C.Yl[A];if(1==Aa.Ci.length){var Sa=String(Aa.Ci[0].get("id"));this.b[Sa].nm==wa&&(J[wa.id]=wa)}}}else J[P.id]=P}for(y=G.length=0;y<C.Yl.length;y++)if(P=C.Yl[y],!(P.id in J)){Q=String(P.Ci[0].get("id"));
T=this.b[Q];var wb=T.Xo;T.Xo=C;$.za(C.Ci,T.item);G.push(wb)}for(y=0;y<G.length;y++){var oc=G[y];$.Ea(C.Yl,oc);delete this.D[oc.id]}}for(x in this.D){C=this.D[x];J={};for(y=0;y<C.Mq.length;y++){var eb=C.Mq[y];if(1==eb.Vj.length&&2>eb.Yl.length&&!eb.Ci.length){var bc=String(eb.Vj[0].get("id"));var tb=this.b[bc];var Mc=tb.Xo;for(A=0;A<C.Mq.length;A++)if(y!=A){var pf=C.Mq[A];if(1==pf.Vj.length){var Bb=String(pf.Vj[0].get("id"));this.b[Bb].Xo==Mc&&(J[eb.id]=eb)}}}else J[eb.id]=eb}for(y=G.length=0;y<C.Mq.length;y++)eb=
C.Mq[y],eb.id in J||(bc=String(eb.Vj[0].get("id")),tb=this.b[bc],wb=tb.nm,tb.nm=C,$.za(C.Vj,tb.item),G.push(wb));for(y=0;y<G.length;y++)oc=G[y],$.Ea(C.Mq,oc),delete this.D[oc.id]}this.G={};var nd;for(nd in this.D){var xc=this.D[nd],Vf;for(Vf=0;Vf<xc.Ci.length;Vf++){var Eg=String(xc.Ci[Vf].get("id")),fd=this.b[Eg];var pc=tW(this,xc,fd.nm);pc.ky=fd;pc.Pe=fd.Pe}for(Vf=0;Vf<xc.Yl.length;Vf++){var pi=xc.Yl[Vf];pc=tW(this,xc,pi);pc.Pe=xc.Pe&&pi.Pe}}this.Ka.length=0;this.Ea.level=0;for(var kg=[this.Ea],
Dj=[];kg.length;){var Sg=kg.pop(),Ti=Sg.level;Dj.length>Ti&&(Dj.length=Ti);Dj.push(Sg);Sg==this.ba&&this.Ka.push(Dj.slice(0));var Sh;for(Sh=Sg.Ci.length;Sh--;){var Tg=String(Sg.Ci[Sh].get("id")),lg=this.b[Tg].nm;var Ff=Ti+1;lg.level=Math.max(Ff,lg.level);this.rb=Math.max(lg.level,this.rb);kg.push(lg)}for(Sh=Sg.Yl.length;Sh--;){var Yd=Sg.Yl[Sh];Ff=Ti+1;Yd.level=Math.max(Ff,Yd.level);this.rb=Math.max(Yd.level,this.rb);kg.push(Yd)}}for(var Ej in this.G){var Hb=this.G[Ej];if(!Hb.vv){var th=Hb.from,vh=
Hb.uf,nr=vh.level-th.level;if(1<nr){for(var Ve=null,Ce,wh,Ug,go=0;go<nr-1;go++){var Kp=!Ve;Ve=Ve||th;Ce={vv:!0,id:null,label:"Fake milestone "+go,level:th.level+1+go,Pe:Hb.Pe,Um:!1,om:!1,Mi:[],yfa:null,YM:null,Mq:[Ve],Yl:[],X0:Hb,Ci:[],Vj:[],Zb:0};Ce.id="fm"+$.oa(Ce);this.D[Ce.id]=Ce;Kp?(Ug={vv:!0,from:Ve,uf:Ce,Um:!1,om:!1,ky:Hb.ky,id:null,Pe:Hb.Pe,X0:Hb},Ug.id="fe"+$.oa(Ug),this.G[Ug.id]=Ug):(Ug=Ve.YM,Ug.uf=Ce);wh={vv:!0,from:Ce,uf:null,Um:!1,om:!1,ky:Hb.ky,id:null,Pe:Hb.Pe,X0:Hb};wh.id="fe"+$.oa(wh);
this.G[wh.id]=wh;Ce.YM=wh;Ce.yfa=Ug;Ce.Mi=[wh,Ug];Ve.vv?(Ve.Yl.push(Ce),Ve.YM.uf=Ce):(Hb.ky||($.Ea(Ve.Yl,vh),$.za(Ve.Yl,Ce)),$.Ea(Ve.Mi,Hb),$.za(Ve.Mi,Ug));Ve=Ce}wh.uf=vh;$.Ea(vh.Mq,th);$.za(vh.Mq,Ce);Ce.Yl.push(vh);var od=(0,$.xa)(vh.Mi,Hb);0>od&&(od=0);$.Ba(vh.Mi,od,1,wh);delete this.G[Hb.id]}}}this.mc.length=0;this.Ea.om=this.ba.om=!0;for(var Vg=!1,Ek=uW(this,Vg),ri=[[this.Ea,this.ba]],si;si=sga(Ek,ri);){var Zd=void 0,We=ri,yl=si[1],Kj=Ek[si[0]],xh=null;for(Zd in Kj.Mi){var Vh=Kj.Mi[Zd].from;Vh.om&&
(!xh||xh.level>Vh.level)&&(xh=Vh)}var or=[xh];for(Vh=xh;Vh;){var Em=Vh.Mi,ho=null;for(Zd=0;Zd<Em.length;Zd++){var Fk=Em[Zd];if(Fk.from==Vh&&!Fk.om){Fk.om=!0;var Fm=Fk.uf;or.push(Fm);Fm.om||(Fm.om=!0,ho=Fm);break}}Vh=ho}var he=void 0,io=void 0,zl=void 0,Al=void 0,ti=We[yl],Xe=or,jo=ti.indexOf(Xe[0]),yh=ti.indexOf(Xe[Xe.length-1]);jo<yh?(Al=jo,zl=yh,io=!1):(Al=yh,zl=jo,io=!0);var De=ti.slice(0,Al);if(io)for(he=Xe.length;he--;)De.push(Xe[he]);else De.push.apply(De,Xe);De.push.apply(De,ti.slice(zl+1));
var $d=ti.slice(Al+1,zl);if(io)$d.push.apply($d,Xe);else for(he=Xe.length;he--;)$d.push(Xe[he]);var Lj=[De,$d];$.Ba(We,yl,1,Lj[0],Lj[1]);Ek=uW(this,Vg=!Vg)}this.mc=ri;this.ga[0]=[this.Ea];this.ga[this.rb]=[this.ba];this.Uc=1;var Wc,Wh;if(2<this.mc.length)for(Wc=0;Wc<this.mc.length;Wc++){var Gk=this.mc[Wc];a:{for(var Gm=window.Infinity,Lp=0,Hk=0;Hk<Gk.length;Hk++){var ko=Gk[Hk];if(!ko.level){var Ye=Hk;break a}ko.level<Gm&&(Gm=ko.level,Lp=Hk)}Ye=Lp}for(var Fg=0,zh,Bl,Hm;;){Fg+=1;Hm=[Gk[$.Za(Ye+Fg,Gk.length)],
Gk[$.Za(Ye-Fg,Gk.length)]];zh=Hm[0];Bl=Hm[1];if(zh==Bl||zh!=Bl&&(zh==this.ba||Bl==this.ba))break;zh.aT=Bl;Bl.nha=zh}}for(Wh in this.D){var Ik=this.D[Wh];if(Ik!=this.Ea&&Ik!=this.ba&&!Ik.nha){var Xi=Ik.level;this.ga[Xi]=[Ik];for(var Wg=Ik;Wg.aT;)this.ga[Xi].push(Wg.aT),Wg=Wg.aT,this.Uc=Math.max(this.Uc,this.ga[Xi].length)}}var Cl=0;for(Wc=0;Wc<this.ga.length;Wc++){var Jk=this.ga[Wc];for(Wh=0;Wh<Jk.length;Wh++){var Mp=Jk[Wh];Mp&&!Mp.vv&&(Mp.index=Cl++)}}}this.I(4096)}};
$.g.x0=function(a){var b=0;$.W(a,4096)&&(b|=16384);$.W(a,8192)&&(b|=32768);$.W(a,1)&&(b|=4);this.u(b,1)};$.g.B0=function(a){var b=0;$.W(a,4096)&&(b|=16384);$.W(a,8192)&&(b|=32768);this.u(b,1)};$.g.Mc=function(a){this.Rk||(this.Rk=new kW,$.V(this,"milestones",this.Rk),$.L(this.Rk,this.x0,this));return $.p(a)?(this.Rk.K(a),this):this.Rk};$.g.ac=function(a){this.Xk||(this.Xk=new lW,$.V(this,"tasks",this.Xk),$.L(this.Xk,this.B0,this));return $.p(a)?(this.Xk.K(a),this):this.Xk};
$.g.we=function(a){this.Ja||(this.Ja=new mW,$.L(this.Ja.Mc(),this.x0,this),this.Ja.Mc().parent(this.Mc()),$.L(this.Ja.ac(),this.B0,this),this.Ja.ac().parent(this.ac()));return $.p(a)?(this.Ja.K(a),this):this.Ja};$.g.Rda=function(a){var b=a.tag;if(b&&null!=b.m){var c=b.m;b=c.Pe?this.we().Mc():this.Mc();var d=this.Ec(!0,void 0,void 0,c),e=c.Be?$.mn:$.Wk;c=b.cv(e,d);b=b.zq(e,d);a.fill(c).stroke(b)}};
$.g.Sda=function(a){if((a=a.tag)&&null!=a.m){var b=a.m;a=b.jU;var c=!0;if(a){var d=this.Mc().Ta().labels();a.gd(d.Gd());c=wW(d,c);b.Be&&(d=this.Mc().selected().labels(),a.gd(d.Gd()),c=wW(d,c));b.Pe&&(d=this.we().Mc().Ta().labels(),a.gd(d.Gd()),c=wW(d,c),b.Be&&(b=this.we().Mc().selected().labels(),a.gd(b.Gd()),c=wW(b,c)));a.enabled(c);a.X()}}};
$.g.vha=function(a){if((a=a.tag)&&null!=a.w){a=a.w;var b=a.I_;b.clear();b.nc(1,0,0,1,0,0);var c={width:null,height:null,rotation:0,padding:[0,0,0,0]},d=a.tV,e=a.$S;if(d){var f=!0,h=this.ac().Ta().fm();f=wW(h,f);d.gd(h.Gd());if(a.Be){var k=this.ac().selected().fm();d.gd(k.Gd());f=wW(k,f)}a.Pe&&(k=this.we().ac().Ta().fm(),d.gd(k.Gd()),f=wW(k,f),a.Be&&(k=this.we().ac().selected().fm(),d.gd(k.Gd()),f=wW(k,f)));d.enabled(f);d.X();f=$.vt(h,d,void 0,c);b.moveTo(f.left,f.top).lineTo(f.left+f.width,f.top).lineTo(f.left+
f.width,f.top+f.height).lineTo(f.left,f.top+f.height).close()}e&&(f=!0,d=this.ac().Ta().Sj(),e.gd(d.Gd()),f=wW(d,f),a.Be&&(h=this.ac().selected().Sj(),e.gd(h.Gd()),f=wW(h,f)),a.Pe&&(h=this.we().ac().Ta().Sj(),e.gd(h.Gd()),f=wW(h,f),a.Be&&(h=this.we().ac().selected().Sj(),e.gd(h.Gd()),f=wW(h,f))),e.enabled(f),e.X(),c=$.vt(d,e,void 0,c),b.moveTo(c.left,c.top).lineTo(c.left+c.width,c.top).lineTo(c.left+c.width,c.top+c.height).lineTo(c.left,c.top+c.height).close());b.Lt(a.rotation,"center")}};
$.g.uha=function(a){var b=a.tag;if(b)if(null!=b.w){var c=b.w;var d=this.g[c.id];var e=c.Pe?this.we().ac():this.ac();d=this.Ec(!0,c,d,void 0);var f=c.Be?$.mn:$.Wk;c=e.cv(f,d);e=e.zq(f,d);b.a&&($.D(e)&&(e=$.Ic(e),delete e.dash),a.fill(c));a.stroke(e)}else null!=b.d&&(e=b.d?this.we().ac():this.ac(),d=this.Ec(!1,void 0,void 0,void 0),c=e.Ux("dummyFill",0,d),e=e.Ux("dummyStroke",0,d),b.a&&($.D(e)&&(e=$.Ic(e),delete e.dash),a.fill(c)),a.stroke(e))};
$.g.Ji=function(a){this.mb();this.J(8192)&&(qW(this),this.I(8192));this.la||(this.la=this.Ua.Nd(),this.U=new $.kA(function(){return $.aj()},function(a){a.clear();a.tag=void 0}),this.U.zIndex(1),this.U.parent(this.la),this.eb=new $.kA(function(){var a=$.aj();a.fill("none").stroke({color:"#fff",opacity:1E-4,thickness:6});return a},function(a){a.clear();a.tag=void 0}),this.eb.zIndex(3),this.eb.parent(this.la),this.va=new $.kA(function(){return $.aj()},function(a){a.clear()}),this.va.zIndex(3),this.va.parent(this.la),
this.vh=this.la.Nd(),this.vh.zIndex(4),this.Za=new $.kA(function(){var a=$.aj();a.fill({color:"#fff",opacity:1E-4}).stroke({color:"#fff",opacity:1E-4,thickness:2});return a},function(a){a.clear();a.tag=void 0;a.nc(1,0,0,1,0,0)}),this.Za.zIndex(5),this.Za.parent(this.la),this.Mc().Jz(this.vh),this.we().Mc().Jz(this.vh),this.ac().Jz(this.vh),this.we().ac().Jz(this.vh),this.Mc().Ki(),this.ac().Ki(),this.we().Mc().Ki(),this.we().ac().Ki());$.Vu(this.Ya(),this);$.Vu(this.Mc().Ya(),this);$.Vu(this.ac().Ya(),
this);$.Vu(this.we().Mc().Ya(),this);$.Vu(this.we().ac().Ya(),this);if(this.J(4)){this.U.clear();this.eb.clear();this.va.clear();this.Za.clear();this.Mc().eJ();this.ac().eJ();var b=$.M(this.i("verticalSpacing"),a.height),c=$.M(this.i("horizontalSpacing"),a.width),d,e=this.rb>=this.Uc?a.width:a.height;var f=$.M(this.we().Mc().i("size"),e);var h=$.M(this.Mc().i("size"),e);var k=Math.max(h,f);h=a.left+k/2;for(f=0;f<this.ga.length;f++){var l=this.ga[f];if(l){var m=a.top+k/2;for(d=0;d<l.length;d++){var n=
l[d];if(n){if(!n.vv){var q=$.lA(this.va);var r=n.Pe?this.we().Mc():this.Mc();r=n.Be?r.selected().i("stroke"):r.Ta().i("stroke");r=0==$.Tn(r)%2?0:.5;var t=n.Pe?this.we().Mc():this.Mc();var u=$.M(t.i("size"),e);var v=Math.round(u/2);n.Zb=v;switch(t.i("shape")){case "rhombus":q.moveTo(h+r-v,m+r).lineTo(h+r,m+r-v).lineTo(h+r+v,m+r).lineTo(h+r,m+r+v).close();break;case "rectangle":q.moveTo(h+r-v,m+r-v).lineTo(h+r+v,m+r-v).lineTo(h+r+v,m+r+v).lineTo(h+r-v,m+r+v).close();break;default:q.moveTo(h+r+v,m+r).arcTo(v,
v,0,360)}q.tag={m:n};n.kU=q;t=this.Ec(!0,void 0,void 0,n);r=n.Pe?this.we().Mc():this.Mc();q=this.Mc().Ta().labels().add(t,{value:{x:h-v,y:m-v}});q.gd(r.Ta().labels().Gd());q.width(u);q.height(u);n.jU=q}n.left=h;n.top=m}m+=b}}h+=c}for(f in this.G)if(t=this.G[f],e=t.from,d=t.uf,c=(b=t.ky?t.ky:void 0)?this.g[b.id]:void 0,r=t.Pe,!e.vv){k=$.lA(this.U);n=$.lA(this.U);l=$.lA(this.eb);k.tag=b?{w:b}:{d:r};n.tag=b?{w:b}:{d:r};n.tag.a=!0;l.tag=b?{w:b}:{d:r};r=t.Pe?this.we().ac():this.ac();u=this.Ec(!0,b,c,void 0);
b?(r=r.zq(b.Be?$.mn:$.Wk,u),b.kU=k,b.I_=$.lA(this.Za),b.I_.tag={w:b},b.EX=n):r=r.Ux("dummyStroke",0,u);r=0==$.Tn(r)%2?0:.5;v=e.left+r+(e.Zb||0);var w=e.top+r;k.moveTo(v,w);l.moveTo(v,w);u=(v+d.left-d.Zb)/2;q=(d.top+w)/2;var x=Math.atan((d.top-e.top)/(d.left-d.Zb-e.left-e.Zb));b&&(b.rotation=180*x/Math.PI);if(t.vv){for(x=t.uf;x.vv;)h=x.left+r,m=x.top+r,k.lineTo(h,m),l.lineTo(h,m),t=x.YM,x=t.uf;v=h;w=m;t=x.left+r-(x.Zb||0);x=x.top+r;var y=Math.atan((x-w)/(t-v)),A=vW(v,w,t,x),G=t-10*Math.cos(y);y=x-
10*Math.sin(y);var C=A[0],J=A[1],P=A[2];A=A[3];k.moveTo(v,w).lineTo(G,y)}else t=d.left+r-(d.Zb||0),x=d.top+r,y=Math.atan((x-w)/(t-v)),A=vW(v,w,t,x),G=t-10*Math.cos(y),y=x-10*Math.sin(y),C=A[0],J=A[1],P=A[2],A=A[3],k.moveTo(v,w).lineTo(G,y);n.moveTo(G,y).lineTo(C,J).lineTo(t,x).lineTo(P,A).close();l.lineTo(t,x);b&&(e=$.Wl(0,0,d.left-d.Zb-e.left-e.Zb,d.top-e.top),t=this.Ec(!0,b,c,void 0),c=this.ac().Ta().fm().add(t,{value:{x:u+r,y:q+r}}),b.tV=c,c.width(e),c.height(a.height),c.rotation(b.rotation),c.tag=
{w:b},r=this.ac().Ta().Sj().add(t,{value:{x:u+r,y:q+r}}),r.width(e),r.height(a.height),b.$S=r,r.rotation(b.rotation),r.tag={w:b})}this.u(49152)}this.J(32768)&&(this.va.Oi(this.Rda,this),this.U.Oi(this.uha,this),this.u(16384),this.I(32768));this.J(16384)&&(this.Mc().Ki(),this.ac().Ki(),this.we().Mc().Ki(),this.we().ac().Ki(),this.va.Oi(this.Sda,this),this.U.Oi(this.vha,this),this.I(16384))};$.g.ej=function(){return this.na?!this.na.Wb():!0};$.g.Xj=function(a,b){return $.Os(this.data(),b)};
$.g.R=function(){this.Sb.length=0;this.Ma.length=0;delete this.b;delete this.g;delete this.na;$.jd(this.Mc(),this.ac(),this.we());$.jd(this.eb,this.Za,this.va,this.U,this.vh,this.la);this.la=this.vh=this.U=this.va=this.Za=this.eb=null;nW.B.R.call(this)};$.g.F=function(){var a=nW.B.F.call(this);this.na&&(a.treeData=this.na.iA());a.milestones=this.Mc().F();a.tasks=this.ac().F();a.criticalPath=this.we().F();$.Bp(this,CW,a);return{chart:a}};
$.g.Y=function(a,b){nW.B.Y.call(this,a,b);this.yc=$.cl("defaultTooltip");"treeData"in a&&this.data($.As(a.treeData));"milestones"in a&&this.Mc().Y(a.milestones,b);"tasks"in a&&this.ac().Y(a.tasks,b);"criticalPath"in a&&this.we().Y(a.criticalPath,b);$.tp(this,CW,a)};var DW=nW.prototype;DW.getType=DW.Qa;DW.tasks=DW.ac;DW.milestones=DW.Mc;DW.criticalPath=DW.we;DW.data=DW.data;DW.toCsv=DW.Xj;$.Fo.pert=xW;$.F("anychart.pert",xW);}).call(this,$)}
