if(!_.pert){_.pert=1;(function($){var pha=function(a){return $.xk(oha,a,"circle")},eZ=function(){$.Yq.call(this);this.Rb=this.Y=this.HM=this.gb=null;$.T(this.ua,[["color",0,8192]]);var a={};$.T(a,[["fill",0,8192],["stroke",0,8192],["labels",0,0]]);this.ca=new $.Yx(this,a,$.Zl);this.ca.pa("labelsFactoryConstructor",$.$x);this.ca.pa("labelsAfterInitCallback",this.lD);this.xa=new $.Yx(this,a,$.po);this.xa.pa("labelsFactoryConstructor",$.$x);this.xa.pa("labelsAfterInitCallback",this.lD);this.Ca=new $.Yx(this,a,$.qo);this.Ca.pa("labelsFactoryConstructor",
$.$x);this.Ca.pa("labelsAfterInitCallback",this.lD)},fZ=function(a){var b=a.Xa().F(),c=a.Xa().i("titleFormat");a=a.Xa().i("format");c&&c!=$.Xo&&(b.titleFormat=c);a&&a!=$.Xo&&(b.format=a);return b},gZ=function(){eZ.call(this);this.Fa("milestones");$.T(this.ua,[["size",0,1],["shape",0,1]])},hZ=function(){eZ.call(this);this.Fa("tasks");$.fy(this.ca,[["dummyFill",0,8192],["dummyStroke",0,8192],["lowerLabels",0,0],["upperLabels",0,0]]);this.ca.pa("lowerLabelsAfterInitCallback",this.lD);this.xa.pa("lowerLabelsAfterInitCallback",
this.lD);this.Ca.pa("lowerLabelsAfterInitCallback",this.lD)},iZ=function(){$.Yq.call(this);this.Fa("criticalPath");this.pk=this.Pj=null},jZ=function(){$.ox.call(this);this.Fa("pert");this.oa=null;this.b={};this.g={};this.f=[];this.Ob=[];this.Ra=[];this.Ga=this.ba=this.D=null;this.ga=[];this.j={};this.Ja=this.pk=this.Pj=this.ka=this.Fh=this.ab=this.eb=this.U=this.ya=null;this.O=[];this.N=[];this.G={};this.wa=[];this.Tc=this.nb=0;this.hc=[];this.gb=this.xc=null;$.eu(this,this,this.rg,this.Gg,this.Hba,
this.rg,null,this.Cj);$.T(this.ua,[["expectedTimeCalculator",8192,1],["verticalSpacing",4,1],["horizontalSpacing",4,1]])},qha=function(a,b,c){var d=a.Xa(),e=!0;$.da(a.xc.enabled)&&(e=a.xc.enabled);d.K(a.xc);b&&$.da(b.enabled)&&(e=b.enabled);d.K(b);c&&$.da(c.enabled)&&(e=c.enabled);d.K(c);d.enabled(e)},rha=function(a){var b={type:"pointsselect",selectedTasks:[],selectedMilestones:[]},c;for(c=0;c<a.O.length;c++){var d=a.O[c],e=a.g[d.id];d={item:d.item,name:d.item.get("name"),successors:d.Qi,predecessors:d.mk,
earliestStart:e.dS,earliestFinish:e.Kz,latestStart:e.KM,latestFinish:e.GU,duration:e.duration,slack:e.iO,variance:e.oX};b.selectedTasks.push(d)}for(c=0;c<a.N.length;c++)d=a.N[c],e={successors:d.Qi,predecessors:d.mk,isCritical:d.Ve,isStart:d.jy},d.FF&&(e.creator=d.FF.item),b.selectedMilestones.push(e);return b},sha=function(a){a.g={};if(a.Ob.length&&a.Ra.length)for(var b=0;b<a.Ob.length;b++)kZ(a,String(a.Ob[b].get("id")));b=0;for(var c in a.g){var d=a.g[c];d.iO||(b+=d.oX)}a.Ia("pertChartCriticalPathStandardDeviation",
Math.sqrt(b));a.I(8192)},kZ=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].oX=$.Qm(Math.pow((e-d)/6,2),3)}d=a.g[b];$.n(d.duration)||(e=a.Ec(!1,c,d),d.duration=$.Qm(a.i("expectedTimeCalculator").call(e,e),3));e=d.duration;var f;if(!$.n(d.dS)){var h=0;for(f=0;f<c.mk.length;f++){var k=String(c.mk[f].get("id")),l=a.g[k];$.n(l)&&$.n(l.Kz)||kZ(a,k);h=Math.max(h,a.g[k].Kz)}d.dS=$.Qm(h,3);d.Kz=$.Qm(h+e,3)}if(!$.n(d.GU)){if(c.Qi.length)for(h=
window.Infinity,f=0;f<c.Qi.length;f++)k=String(c.Qi[f].get("id")),l=a.g[k],$.n(l)&&$.n(l.KM)||kZ(a,k),h=Math.min(h,a.g[k].KM);else{h=-window.Infinity;for(f=0;f<a.Ra.length;f++)c=String(a.Ra[f].get("id")),k=a.g[c],$.n(k)&&$.n(k.Kz)||kZ(a,c),h=Math.max(h,a.g[c].Kz);a.Ia("pertChartProjectDuration",h)}d.GU=$.Qm(h,3);d.KM=$.Qm(h-e,3);d.iO=$.Qm(h-d.Kz,3)}},lZ=function(a,b){a!=b&&($.Ba(a.fr,b),$.Ba(b.om,a))},mZ=function(a,b,c,d){b={label:d||"",id:"",Qi:[],mk:[],om:[],fr:[],level:-1,Ve:!1,left:0,top:0,jy:c,
FF:b,kn:!1,Dm:!1,aj:[],index:-1};c="m"+$.oa(b);a.j[c]=b;b.id=c;return b},tha=function(a,b,c){var d={from:b,Cf:c,kn:!1,Dm:!1,Sy:null,id:"",Ve:!1},e="e"+$.oa(d);d.id=e;a.G[e]=d;$.Ba(b.aj,d);$.Ba(c.aj,d);return d},uha=function(a,b){var c,d,e=[];for(c in a.G){var f=a.G[c];if(!f.Dm&&f.kn==b){f.kn=!b;var h={aJ:{},aj:{}};h.aJ[f.from.id]=f.from;h.aJ[f.Cf.id]=f.Cf;h.aj[f.id]=f;var k=[];f.from.Dm||f.from.kn!=b||(f.from.kn=!b,k.push(f.from));f.Cf.Dm||f.Cf.kn!=b||(f.Cf.kn=!b,k.push(f.Cf));for(;k.length;){var l=
k.pop();for(d=0;d<l.aj.length;d++)if(f=l.aj[d],!f.Dm&&f.kn==b){f.kn=!b;h.aj[f.id]=f;var m=f.from==l?f.Cf:f.from;m.Dm||m.kn!=b||(m.kn=!b,k.push(m));h.aJ[m.id]=m}}e.push(h)}f.kn=!b}for(c in a.j)a.j[c].kn=!b;return e},vha=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 p=b[d],q=!0;for(e in k.aJ){var r=k.aJ[e];if(r.Dm&&0>p.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},
wha=function(a,b,c,d){var e=Math.atan((d-b)/(c-a)),f=Math.atan(.3);a=$.dn(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)]},nZ=function(a,b){return $.da(a.enabled())?a.enabled():b},xha=function(){var a=new jZ;a.ia(!0,$.mm("pert"));return a},oha={iP:"circle",Ama:"rhombus",y7:"rectangle"};$.H(eZ,$.Yq);$.xq(eZ,["fill","stroke","labels"],"normal");eZ.prototype.qa=$.Yq.prototype.qa|28672;eZ.prototype.sa=$.Yq.prototype.sa;var oZ={};$.gq(oZ,1,"color",$.Eq);
$.U(eZ,oZ);$.g=eZ.prototype;$.g.i=$.Xq;$.g.vG=function(a){var b=this.parent();return b?b[a&$.qo?"selected":a&$.po?"hovered":"normal"]():null};$.g.Vf=function(a){$.n(a)&&(this.Rb=a);return this.Rb};$.g.Qg=$.Wq;$.g.Md=function(){var a=[this.ma];this.Y&&(a=$.Ga(a,this.Y.Md()));return a};$.g.Ld=function(){var a=[this.Ma];this.Y&&(a=$.Ga(a,this.Y.Ld()));return a};
$.g.parent=function(a){return $.n(a)?(this.Y!=a&&(null===a?($.Zq(this.Y,this.Qc,this),this.Y=null):(this.Y&&$.Zq(this.Y,this.Qc,this),this.Y=a,this.Xa().Ye().parent(this.Y.Xa()),$.L(this.Y,this.Qc,this))),this):this.Y};$.g.Qc=function(a){var b=0,c=0;$.X(a,1)&&(b|=16,c|=1);$.X(a,8)&&(b|=4,c|=8);$.X(a,32768)&&(b|=1,c|=1);this.Rb=null;this.B(b,c)};$.g.Sa=function(a){return $.n(a)?(this.ca.K(a),this):this.ca};$.g.mb=function(a){return $.n(a)?(this.xa.K(a),this):this.xa};
$.g.selected=function(a){return $.n(a)?(this.Ca.K(a),this):this.Ca};$.g.vv=function(a,b){return this.Cy("fill",a,b)};$.g.Tq=function(a,b){return this.Cy("stroke",a,b)};$.g.Cy=function(a,b,c){a=(0==b?this.ca:1==b?this.xa:this.Ca).i(a);$.E(a)&&(c.sourceColor=this.i("color"),a=a.call(c));return a};$.g.lD=function(a){$.L(a,this.dr,this)};$.g.dr=function(){this.ta(4096)};
$.g.Xa=function(a){this.gb||(this.gb=new $.iw(0),$.W(this,"tooltip",this.gb),$.L(this.gb,this.hp,this));return $.n(a)?(this.gb.K(a),this):this.gb};$.g.hp=function(){this.ta(16384)};$.g.mA=function(a){return $.n(a)?(this.HM!=a&&(this.HM=a,this.ca.labels().P(this.HM)),this):this.HM};$.g.fi=function(){this.ca.labels().$();return this};$.g.oK=function(){this.ca.labels().clear();return this};
$.g.F=function(){var a=eZ.u.F.call(this);$.Hq(this,oZ,a,"Pert visual element");a.normal=this.ca.F();a.hovered=this.xa.F();a.selected=this.Ca.F();a.tooltip=this.Xa().F();return a};$.g.X=function(a,b){eZ.u.X.call(this,a,b);$.zq(this,oZ,a);this.ca.ia(!!b,a);this.ca.ia(!!b,a.normal);this.xa.ia(!!b,a.hovered);this.Ca.ia(!!b,a.selected);"tooltip"in a&&this.Xa().ia(!!b,a.tooltip)};$.g.R=function(){$.td(this.gb);eZ.u.R.call(this)};var pZ=eZ.prototype;pZ.tooltip=pZ.Xa;pZ.normal=pZ.Sa;pZ.hovered=pZ.mb;
pZ.selected=pZ.selected;$.H(gZ,eZ);gZ.prototype.qa=eZ.prototype.qa|1;var qZ=function(){var a={};$.hq(a,[[0,"size",function(a){return $.so(a,80)||0}],[0,"shape",pha]]);return a}();$.U(gZ,qZ);gZ.prototype.F=function(){var a=gZ.u.F.call(this);$.Hq(this,qZ,a);return a};gZ.prototype.X=function(a,b){gZ.u.X.call(this,a,b);$.zq(this,qZ,a)};$.H(hZ,eZ);$.xq(hZ,["dummyFill","dummyStroke","lowerLabels","upperLabels"],"normal");hZ.prototype.qa=eZ.prototype.qa;hZ.prototype.mA=function(a){hZ.u.mA.call(this,a);(a=hZ.u.mA.call(this))&&this.ca.jk().P(a);return a};hZ.prototype.fi=function(){this.ca.jk().$();return hZ.u.fi.call(this)};hZ.prototype.oK=function(){this.ca.jk().clear();return hZ.u.oK.call(this)};$.H(iZ,$.Yq);$.g=iZ.prototype;$.g.qa=$.Yq.prototype.qa|12289;$.g.Pc=function(a){this.Pj||(this.Pj=new gZ,$.W(this,"milestones",this.Pj));return $.n(a)?(this.Pj.K(a),this):this.Pj};$.g.Jc=function(a){this.pk||(this.pk=new hZ,$.W(this,"tasks",this.pk));return $.n(a)?(this.pk.K(a),this):this.pk};$.g.F=function(){var a=iZ.u.F.call(this);a.tasks=this.Jc().F();a.milestones=this.Pc().F();return a};
$.g.X=function(a,b){iZ.u.X.call(this,a,b);"milestones"in a&&this.Pc().X(a.milestones,b);"tasks"in a&&this.Jc().X(a.tasks,b)};var rZ=iZ.prototype;rZ.tasks=rZ.Jc;rZ.milestones=rZ.Pc;$.H(jZ,$.ox);$.g=jZ.prototype;$.g.qa=$.ox.prototype.qa;$.g.sa=$.ox.prototype.sa|61440;$.g.Na=function(){return"pert"};
$.g.Ec=function(a,b,c,d){if(!this.D||a)this.D=new $.rw;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");$.n(f)&&(a.pessimistic={value:+f,type:"number"});f=b.item.get("optimistic");$.n(f)&&(a.optimistic={value:+f,type:"number"});f=b.item.get("mostLikely");$.n(f)&&(a.mostLikely={value:+f,type:"number"});f=b.item.get("duration");$.n(f)&&(a.duration={value:+f,type:"number"});a.successors={value:b.Qi,type:""};a.predecessors=
{value:b.mk,type:""};a.isCritical={value:b.Ve,type:"string"}}c&&(a.earliestStart={value:c.dS,type:"number"},a.earliestFinish={value:c.Kz,type:"number"},a.latestStart={value:c.KM,type:"number"},a.latestFinish={value:c.GU,type:"number"},$.n(a.duration)||(a.duration={value:c.duration,type:"number"}),a.slack={value:c.iO,type:"number"},a.variance={value:c.oX,type:"number"});d&&(a.successors={value:d.Qi,type:""},a.predecessors={value:d.mk,type:""},a.isCritical={value:d.Ve,type:"string"},d.FF&&(a.creator=
{value:d.FF.item,type:""}),a.isStart={value:d.jy,type:"string"},a.index={value:d.index,type:"number"});this.D.mj([this]).Ag(e);return $.av(this.D,a)};$.g.xK=function(){var a=new $.iw(0);a.Aa(this);$.L(a,this.hp,this);return a};$.g.hp=function(){this.Xa().$()};$.g.data=function(a,b,c){return $.n(a)?($.K(a,$.Nt)||$.K(a,$.Kt)?this.oa!=a&&(this.oa&&$.Zq(this.oa,this.Id,this),this.oa=a):(this.oa&&$.Zq(this.oa,this.Id,this),this.oa=new $.Nt(a,b,c)),$.L(this.oa,this.Id,this),this.B(4352,1),this):this.oa};
$.g.By=function(){this.Za().Nq()&&this.B(-6145,9)};$.g.Id=function(){this.B(4356,1)};$.g.bm=function(){return[]};$.g.Te=function(){return[]};
$.g.rg=function(a){var b=a.domTarget,c=this.Xa();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.Ve?this.Fe().Pc():this.Pc();var k=f.Le?$.qo:$.po;e=h.vv(k,d);h=h.Tq(k,d);b.fill(e).stroke(h);e=!1;b=f.Ve?fZ(this.Fe().Pc()):void 0;$.V(c);qha(this,fZ(this.Pc()),b);$.Aw(c,a.clientX,a.clientY,d);c.da(!0);if(a=f.XV)b=!0,c=this.Pc().Sa().labels(),a.kd(c.Sd()),b=nZ(c,b),f.Le?(c=this.Pc().selected().labels(),a.kd(c.Sd()),b=nZ(c,b)):(c=this.Pc().mb().labels(),a.kd(c.Sd()),
b=nZ(c,b)),f.Ve&&(c=this.Fe().Pc().Sa().labels(),a.kd(c.Sd()),b=nZ(c,b),f.Le?(c=this.Fe().Pc().selected().labels(),a.kd(c.Sd()),b=nZ(c,b)):(c=this.Fe().Pc().mb().labels(),a.kd(c.Sd()),b=nZ(c,b))),a.enabled(b),a.$()}else null!=d.w&&(f=d.w,b=this.g[f.id],d=this.Ec(!0,f,b,void 0),k=f.Le?$.qo:$.po,h=f.Ve?this.Fe().Jc():this.Jc(),e=h.vv(k,d),h=h.Tq(k,d),f.YV.stroke(h),f.DZ.fill(e).stroke(h),h=f.kX,e=f.MU,h&&(b=!0,k=this.Jc().Sa().um(),h.kd(k.Sd()),b=nZ(k,b),f.Le?(k=this.Jc().selected().um(),h.kd(k.Sd()),
b=nZ(k,b)):(k=this.Jc().mb().um(),h.kd(k.Sd()),b=nZ(k,b)),f.Ve&&(k=this.Fe().Jc().Sa().um(),h.kd(k.Sd()),b=nZ(k,b),f.Le?(k=this.Fe().Jc().selected().um(),h.kd(k.Sd()),b=nZ(k,b)):(k=this.Fe().Jc().mb().um(),h.kd(k.Sd()),b=nZ(k,b))),h.enabled(b),h.$()),e&&(b=!0,h=this.Jc().Sa().jk(),e.kd(h.Sd()),b=nZ(h,b),f.Le?(h=this.Jc().selected().jk(),e.kd(h.Sd()),b=nZ(h,b)):(h=this.Jc().mb().jk(),e.kd(h.Sd()),b=nZ(h,b)),f.Ve&&(h=this.Fe().Jc().Sa().jk(),e.kd(h.Sd()),b=nZ(h,b),f.Le?(h=this.Fe().Jc().selected().jk(),
e.kd(h.Sd()),b=nZ(h,b)):(h=this.Fe().Jc().mb().jk(),e.kd(h.Sd()),b=nZ(h,b))),e.enabled(b),e.$()),e=!1,b=f.Ve?fZ(this.Fe().Jc()):void 0,$.V(c),qha(this,fZ(this.Jc()),b),$.Aw(c,a.clientX,a.clientY,d),c.da(!0));e&&this.Xa().Oc()};
$.g.Gg=function(a){var b=a.domTarget;if(a=b.tag)if(null!=a.m){var c=a.m;a=c.Ve?this.Fe().Pc():this.Pc();var d=this.Ec(!0,void 0,void 0,c);var e=c.Le?$.qo:$.Zl;var f=a.vv(e,d);d=a.Tq(e,d);if(e=c.XV){a=!0;var h=this.Pc().Sa().labels();e.kd(h.Sd());a=nZ(h,a);c.Le&&(h=this.Pc().selected().labels(),e.kd(h.Sd()),a=nZ(h,a));c.Ve&&(h=this.Fe().Pc().Sa().labels(),e.kd(h.Sd()),a=nZ(h,a),c.Le&&(c=this.Fe().Pc().selected().labels(),e.kd(c.Sd()),a=nZ(c,a)));e.enabled(a);e.$()}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.Le?$.qo:$.Zl,a=b.Ve?this.Fe().Jc():this.Jc(),f=a.vv(e,d),d=a.Tq(e,d),b.YV.stroke(d),b.DZ.fill(f).stroke(d),c=b.kX,f=b.MU,c&&(a=!0,d=this.Jc().Sa().um(),c.kd(d.Sd()),a=nZ(d,a),b.Le&&(d=this.Jc().selected().um(),c.kd(d.Sd()),a=nZ(d,a)),b.Ve&&(d=this.Fe().Jc().Sa().um(),c.kd(d.Sd()),a=nZ(d,a),b.Le&&(d=this.Fe().Jc().selected().um(),c.kd(d.Sd()),a=nZ(d,a))),c.enabled(a),c.$()),f&&(a=!0,c=this.Jc().Sa().jk(),f.kd(c.Sd()),a=nZ(c,a),b.Le&&(c=this.Jc().selected().jk(),
f.kd(c.Sd()),a=nZ(c,a)),b.Ve&&(c=this.Fe().Jc().Sa().jk(),f.kd(c.Sd()),a=nZ(c,a),b.Le&&(b=this.Fe().Jc().selected().jk(),f.kd(b.Sd()),a=nZ(b,a))),f.enabled(a),f.$()))};
$.g.Hba=function(a){var b=a.metaKey||a.ctrlKey,c,d,e=a.domTarget,f=e.tag;$.K(a.target,$.Du)&&(f=a.target.Vd(a.labelIndex).tag);if($.K(e,$.hg)){f&&(null!=f.m?c=f.m:null!=f.w&&(d=f.w));if(c||d)if(b)c&&(c.Le=!c.Le,c.Le?$.Ba(this.N,c):$.Fa(this.N,c)),d&&(d.Le=!d.Le,d.Le?$.Ba(this.O,d):$.Fa(this.O,d));else{for(a=0;a<this.N.length;a++)this.N[a].Le=!1;for(a=0;a<this.O.length;a++)this.O[a].Le=!1;this.N.length=0;this.O.length=0;c&&(c.Le=!0,this.N.push(c));d&&(d.Le=!0,this.O.push(d))}else{for(a=0;a<this.N.length;a++)this.N[a].Le=
!1;for(a=0;a<this.O.length;a++)this.O[a].Le=!1;this.N.length=0;this.O.length=0}this.dispatchEvent(rha(this));this.B(32768,1)}};var sZ=function(){var a={};$.gq(a,0,"expectedTimeCalculator",$.tq);$.gq(a,0,"verticalSpacing",function(a){return $.so(a,20)});$.gq(a,0,"horizontalSpacing",function(a){return $.so(a,20)});return a}();$.U(jZ,sZ);$.g=jZ.prototype;
$.g.ob=function(){if(this.J(4096)){this.b={};this.Ob.length=0;this.Ra.length=0;if(this.oa&&!this.oa.fd){for(var a=this.oa.Rz(),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,Qi:[],mk:[],level:-1,Ve:!1,LR:[],MR:[]},this.Ra.push(c));var e=c.get("dependsOn");if($.n(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].Qi.push(c),this.b[d].mk.push(this.b[h].item),$.Fa(this.Ra,this.b[h].item),$.Ua(this.b[h].MR,d),
$.Ua(this.b[d].LR,h));else{var k=this.oa.op("id",h)[0];if(k){var l=String(k.get("id"));this.b[l]={id:l,item:k,Qi:[c],mk:[],level:-1,Ve:!1,LR:[],MR:[]};$.Fa(this.Ra,k);this.b[d].mk.push(k);$.Ua(this.b[l].MR,d);$.Ua(this.b[d].LR,h)}}}else this.Ob.push(c)}sha(this);this.ga.length=0;this.j={};this.Ga=mZ(this,null,!0,"Start");this.Ga.Ve=!0;this.ba=mZ(this,null,!1,"Finish");this.ba.Ve=!0;var m,p;for(p in this.b){var q=this.b[p],r=this.g[p];q.pp||(q.pp=mZ(this,q,!0,"S"+q.item.get("name")));q.Bm||(q.Bm=mZ(this,
q,!1,"F"+q.item.get("name")),q.Bm.FF=q);$.Ba(q.pp.Qi,q.item);$.Ba(q.Bm.mk,q.item);r.iO||(q.Ve=!0,q.pp.Ve=!0,q.Bm.Ve=!0);if(q.Qi.length)for(m=0;m<q.Qi.length;m++){var t=String(q.Qi[m].get("id")),u=this.b[t];u.pp||(u.pp=mZ(this,u,!0,"S"+u.item.get("name")));u.Bm||(u.Bm=mZ(this,u,!1,"F"+u.item.get("name")));lZ(u.pp,q.Bm)}else lZ(this.ba,q.Bm);if(q.mk.length)for(m=0;m<q.mk.length;m++){var v=String(q.mk[m].get("id")),w=this.b[v];w.pp||(w.pp=mZ(this,w,!0,"Start: "+w.item.get("name")));w.Bm||(w.Bm=mZ(this,
w,!1,"Finish: "+w.item.get("name")));lZ(q.pp,w.Bm)}else lZ(q.pp,this.Ga)}var x,y,B,G=[];for(x in this.j){var C=this.j[x];var I={};for(y=0;y<C.om.length;y++){var P=C.om[y];if(1==P.Qi.length&&2>P.fr.length&&!P.mk.length){var Q=String(P.Qi[0].get("id"));var S=this.b[Q];var sa=S.Bm;for(B=0;B<C.om.length;B++)if(y!=B){var va=C.om[B];if(1==va.Qi.length){var Oa=String(va.Qi[0].get("id"));this.b[Oa].Bm==sa&&(I[sa.id]=sa)}}}else I[P.id]=P}for(y=G.length=0;y<C.om.length;y++)if(P=C.om[y],!(P.id in I)){Q=String(P.Qi[0].get("id"));
S=this.b[Q];var vb=S.pp;S.pp=C;$.Ba(C.Qi,S.item);G.push(vb)}for(y=0;y<G.length;y++){var mc=G[y];$.Fa(C.om,mc);delete this.j[mc.id]}}for(x in this.j){C=this.j[x];I={};for(y=0;y<C.fr.length;y++){var kb=C.fr[y];if(1==kb.mk.length&&2>kb.om.length&&!kb.Qi.length){var Qb=String(kb.mk[0].get("id"));var Gb=this.b[Qb];var ic=Gb.pp;for(B=0;B<C.fr.length;B++)if(y!=B){var ie=C.fr[B];if(1==ie.mk.length){var Rb=String(ie.mk[0].get("id"));this.b[Rb].pp==ic&&(I[kb.id]=kb)}}}else I[kb.id]=kb}for(y=G.length=0;y<C.fr.length;y++)kb=
C.fr[y],kb.id in I||(Qb=String(kb.mk[0].get("id")),Gb=this.b[Qb],vb=Gb.Bm,Gb.Bm=C,$.Ba(C.mk,Gb.item),G.push(vb));for(y=0;y<G.length;y++)mc=G[y],$.Fa(C.fr,mc),delete this.j[mc.id]}this.G={};var Fc;for(Fc in this.j){var Wb=this.j[Fc],Ie;for(Ie=0;Ie<Wb.Qi.length;Ie++){var dd=String(Wb.Qi[Ie].get("id")),Lc=this.b[dd];var hb=tha(this,Wb,Lc.Bm);hb.Sy=Lc;hb.Ve=Lc.Ve}for(Ie=0;Ie<Wb.om.length;Ie++){var zc=Wb.om[Ie];hb=tha(this,Wb,zc);hb.Ve=Wb.Ve&&zc.Ve}}this.wa.length=0;this.Ga.level=0;for(var Je=[this.Ga],
nh=[];Je.length;){var je=Je.pop(),oh=je.level;nh.length>oh&&(nh.length=oh);nh.push(je);je==this.ba&&this.wa.push(nh.slice(0));var ve;for(ve=je.Qi.length;ve--;){var Yd=String(je.Qi[ve].get("id")),we=this.b[Yd].Bm;var af=oh+1;we.level=Math.max(af,we.level);this.nb=Math.max(we.level,this.nb);Je.push(we)}for(ve=je.om.length;ve--;){var rd=je.om[ve];af=oh+1;rd.level=Math.max(af,rd.level);this.nb=Math.max(rd.level,this.nb);Je.push(rd)}}for(var ph in this.G){var ld=this.G[ph];if(!ld.Rv){var Gg=ld.from,Kg=
ld.Cf,cm=Kg.level-Gg.level;if(1<cm){for(var xe=null,ke,sf,If,zj=0;zj<cm-1;zj++){var dm=!xe;xe=xe||Gg;ke={Rv:!0,id:null,label:"Fake milestone "+zj,level:Gg.level+1+zj,Ve:ld.Ve,kn:!1,Dm:!1,aj:[],mha:null,xO:null,fr:[xe],om:[],x3:ld,Qi:[],mk:[],Wb:0};ke.id="fm"+$.oa(ke);this.j[ke.id]=ke;dm?(If={Rv:!0,from:xe,Cf:ke,kn:!1,Dm:!1,Sy:ld.Sy,id:null,Ve:ld.Ve,x3:ld},If.id="fe"+$.oa(If),this.G[If.id]=If):(If=xe.xO,If.Cf=ke);sf={Rv:!0,from:ke,Cf:null,kn:!1,Dm:!1,Sy:ld.Sy,id:null,Ve:ld.Ve,x3:ld};sf.id="fe"+$.oa(sf);
this.G[sf.id]=sf;ke.xO=sf;ke.mha=If;ke.aj=[sf,If];xe.Rv?(xe.om.push(ke),xe.xO.Cf=ke):(ld.Sy||($.Fa(xe.om,Kg),$.Ba(xe.om,ke)),$.Fa(xe.aj,ld),$.Ba(xe.aj,If));xe=ke}sf.Cf=Kg;$.Fa(Kg.fr,Gg);$.Ba(Kg.fr,ke);ke.om.push(Kg);var Mc=(0,$.za)(Kg.aj,ld);0>Mc&&(Mc=0);$.Ca(Kg.aj,Mc,1,sf);delete this.G[ld.id]}}}this.hc.length=0;this.Ga.Dm=this.ba.Dm=!0;for(var Ui=!1,vi=uha(this,Ui),$g=[[this.Ga,this.ba]],wi;wi=vha(vi,$g);){var ye=void 0,Jf=$g,Aj=wi[1],Bj=vi[wi[0]],Vi=null;for(ye in Bj.aj){var ze=Bj.aj[ye].from;
ze.Dm&&(!Vi||Vi.level>ze.level)&&(Vi=ze)}var em=[Vi];for(ze=Vi;ze;){var Cj=ze.aj,Wi=null;for(ye=0;ye<Cj.length;ye++){var Gd=Cj[ye];if(Gd.from==ze&&!Gd.Dm){Gd.Dm=!0;var Xh=Gd.Cf;em.push(Xh);Xh.Dm||(Xh.Dm=!0,Wi=Xh);break}}ze=Wi}var Xi=void 0,ah=void 0,Yh=void 0,rh=void 0,bh=Jf[Aj],Ke=em,uk=bh.indexOf(Ke[0]),vg=bh.indexOf(Ke[Ke.length-1]);uk<vg?(rh=uk,Yh=vg,ah=!1):(rh=vg,Yh=uk,ah=!0);var Kf=bh.slice(0,rh);if(ah)for(Xi=Ke.length;Xi--;)Kf.push(Ke[Xi]);else Kf.push.apply(Kf,Ke);Kf.push.apply(Kf,bh.slice(Yh+
1));var Cd=bh.slice(rh+1,Yh);if(ah)Cd.push.apply(Cd,Ke);else for(Xi=Ke.length;Xi--;)Cd.push(Ke[Xi]);var Qd=[Kf,Cd];$.Ca(Jf,Aj,1,Qd[0],Qd[1]);vi=uha(this,Ui=!Ui)}this.hc=$g;this.ga[0]=[this.Ga];this.ga[this.nb]=[this.ba];this.Tc=1;var md,wg;if(2<this.hc.length)for(md=0;md<this.hc.length;md++){var Zh=this.hc[md];a:{for(var $h=window.Infinity,Nb=0,Rd=0;Rd<Zh.length;Rd++){var ai=Zh[Rd];if(!ai.level){var Lf=Rd;break a}ai.level<$h&&($h=ai.level,Nb=Rd)}Lf=Nb}for(var Ae=0,Zd,sh,ch;;){Ae+=1;ch=[Zh[$.$a(Lf+
Ae,Zh.length)],Zh[$.$a(Lf-Ae,Zh.length)]];Zd=ch[0];sh=ch[1];if(Zd==sh||Zd!=sh&&(Zd==this.ba||sh==this.ba))break;Zd.NU=sh;sh.Wia=Zd}}for(wg in this.j){var xi=this.j[wg];if(xi!=this.Ga&&xi!=this.ba&&!xi.Wia){var bi=xi.level;this.ga[bi]=[xi];for(var dh=xi;dh.NU;)this.ga[bi].push(dh.NU),dh=dh.NU,this.Tc=Math.max(this.Tc,this.ga[bi].length)}}var Dj=0;for(md=0;md<this.ga.length;md++){var Yi=this.ga[md];for(wg=0;wg<Yi.length;wg++){var fm=Yi[wg];fm&&!fm.Rv&&(fm.index=Dj++)}}}this.I(4096)}};
$.g.Q2=function(a){var b=0;$.X(a,4096)&&(b|=16384);$.X(a,8192)&&(b|=32768);$.X(a,1)&&(b|=4);this.B(b,1)};$.g.U2=function(a){var b=0;$.X(a,4096)&&(b|=16384);$.X(a,8192)&&(b|=32768);this.B(b,1)};$.g.Pc=function(a){this.Pj||(this.Pj=new gZ,$.W(this,"milestones",this.Pj),$.L(this.Pj,this.Q2,this));return $.n(a)?(this.Pj.K(a),this):this.Pj};$.g.Jc=function(a){this.pk||(this.pk=new hZ,$.W(this,"tasks",this.pk),$.L(this.pk,this.U2,this));return $.n(a)?(this.pk.K(a),this):this.pk};
$.g.Fe=function(a){this.Ja||(this.Ja=new iZ,$.L(this.Ja.Pc(),this.Q2,this),this.Ja.Pc().parent(this.Pc()),$.L(this.Ja.Jc(),this.U2,this),this.Ja.Jc().parent(this.Jc()));return $.n(a)?(this.Ja.K(a),this):this.Ja};$.g.Dfa=function(a){var b=a.tag;if(b&&null!=b.m){var c=b.m;b=c.Ve?this.Fe().Pc():this.Pc();var d=this.Ec(!0,void 0,void 0,c),e=c.Le?$.qo:$.Zl;c=b.vv(e,d);b=b.Tq(e,d);a.fill(c).stroke(b)}};
$.g.Efa=function(a){if((a=a.tag)&&null!=a.m){var b=a.m;a=b.XV;var c=!0;if(a){var d=this.Pc().Sa().labels();a.kd(d.Sd());c=nZ(d,c);b.Le&&(d=this.Pc().selected().labels(),a.kd(d.Sd()),c=nZ(d,c));b.Ve&&(d=this.Fe().Pc().Sa().labels(),a.kd(d.Sd()),c=nZ(d,c),b.Le&&(b=this.Fe().Pc().selected().labels(),a.kd(b.Sd()),c=nZ(b,c)));a.enabled(c);a.$()}}};
$.g.eja=function(a){if((a=a.tag)&&null!=a.w){a=a.w;var b=a.W1;b.clear();b.jc(1,0,0,1,0,0);var c={width:null,height:null,rotation:0,padding:[0,0,0,0]},d=a.kX,e=a.MU;if(d){var f=!0,h=this.Jc().Sa().um();f=nZ(h,f);d.kd(h.Sd());if(a.Le){var k=this.Jc().selected().um();d.kd(k.Sd());f=nZ(k,f)}a.Ve&&(k=this.Fe().Jc().Sa().um(),d.kd(k.Sd()),f=nZ(k,f),a.Le&&(k=this.Fe().Jc().selected().um(),d.kd(k.Sd()),f=nZ(k,f)));d.enabled(f);d.$();f=$.Lu(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.Jc().Sa().jk(),e.kd(d.Sd()),f=nZ(d,f),a.Le&&(h=this.Jc().selected().jk(),e.kd(h.Sd()),f=nZ(h,f)),a.Ve&&(h=this.Fe().Jc().Sa().jk(),e.kd(h.Sd()),f=nZ(h,f),a.Le&&(h=this.Fe().Jc().selected().jk(),e.kd(h.Sd()),f=nZ(h,f))),e.enabled(f),e.$(),c=$.Lu(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.fu(a.rotation,"center")}};
$.g.dja=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.Ve?this.Fe().Jc():this.Jc();d=this.Ec(!0,c,d,void 0);var f=c.Le?$.qo:$.Zl;c=e.vv(f,d);e=e.Tq(f,d);b.a&&($.D(e)&&(e=$.Qc(e),delete e.dash),a.fill(c));a.stroke(e)}else null!=b.d&&(e=b.d?this.Fe().Jc():this.Jc(),d=this.Ec(!1,void 0,void 0,void 0),c=e.Cy("dummyFill",0,d),e=e.Cy("dummyStroke",0,d),b.a&&($.D(e)&&(e=$.Qc(e),delete e.dash),a.fill(c)),a.stroke(e))};
$.g.ei=function(a){this.ob();this.J(8192)&&(sha(this),this.I(8192));this.ka||(this.ka=this.La.Dd(),this.U=new $.JB(function(){return $.nk()},function(a){a.clear();a.tag=void 0}),this.U.zIndex(1),this.U.parent(this.ka),this.eb=new $.JB(function(){var a=$.nk();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.ka),this.ya=new $.JB(function(){return $.nk()},function(a){a.clear()}),this.ya.zIndex(3),this.ya.parent(this.ka),
this.Fh=this.ka.Dd(),this.Fh.zIndex(4),this.ab=new $.JB(function(){var a=$.nk();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.jc(1,0,0,1,0,0)}),this.ab.zIndex(5),this.ab.parent(this.ka),this.Pc().mA(this.Fh),this.Fe().Pc().mA(this.Fh),this.Jc().mA(this.Fh),this.Fe().Jc().mA(this.Fh),this.Pc().fi(),this.Jc().fi(),this.Fe().Pc().fi(),this.Fe().Jc().fi());$.mw(this.Xa(),this);$.mw(this.Pc().Xa(),this);$.mw(this.Jc().Xa(),
this);$.mw(this.Fe().Pc().Xa(),this);$.mw(this.Fe().Jc().Xa(),this);if(this.J(4)){this.U.clear();this.eb.clear();this.ya.clear();this.ab.clear();this.Pc().oK();this.Jc().oK();var b=$.M(this.i("verticalSpacing"),a.height),c=$.M(this.i("horizontalSpacing"),a.width),d,e=this.nb>=this.Tc?a.width:a.height;var f=$.M(this.Fe().Pc().i("size"),e);var h=$.M(this.Pc().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 p=
l[d];if(p){if(!p.Rv){var q=$.KB(this.ya);var r=p.Ve?this.Fe().Pc():this.Pc();r=p.Le?r.selected().i("stroke"):r.Sa().i("stroke");r=0==$.Wo(r)%2?0:.5;var t=p.Ve?this.Fe().Pc():this.Pc();var u=$.M(t.i("size"),e);var v=Math.round(u/2);p.Wb=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:p};p.YV=q;t=this.Ec(!0,void 0,void 0,p);r=p.Ve?this.Fe().Pc():this.Pc();q=this.Pc().Sa().labels().add(t,{value:{x:h-v,y:m-v}});q.kd(r.Sa().labels().Sd());q.width(u);q.height(u);p.XV=q}p.left=h;p.top=m}m+=b}}h+=c}for(f in this.G)if(t=this.G[f],e=t.from,d=t.Cf,c=(b=t.Sy?t.Sy:void 0)?this.g[b.id]:void 0,r=t.Ve,!e.Rv){k=$.KB(this.U);p=$.KB(this.U);l=$.KB(this.eb);k.tag=b?{w:b}:{d:r};p.tag=b?{w:b}:{d:r};p.tag.a=!0;l.tag=b?{w:b}:{d:r};r=t.Ve?this.Fe().Jc():this.Jc();u=this.Ec(!0,b,c,void 0);
b?(r=r.Tq(b.Le?$.qo:$.Zl,u),b.YV=k,b.W1=$.KB(this.ab),b.W1.tag={w:b},b.DZ=p):r=r.Cy("dummyStroke",0,u);r=0==$.Wo(r)%2?0:.5;v=e.left+r+(e.Wb||0);var w=e.top+r;k.moveTo(v,w);l.moveTo(v,w);u=(v+d.left-d.Wb)/2;q=(d.top+w)/2;var x=Math.atan((d.top-e.top)/(d.left-d.Wb-e.left-e.Wb));b&&(b.rotation=180*x/Math.PI);if(t.Rv){for(x=t.Cf;x.Rv;)h=x.left+r,m=x.top+r,k.lineTo(h,m),l.lineTo(h,m),t=x.xO,x=t.Cf;v=h;w=m;t=x.left+r-(x.Wb||0);x=x.top+r;var y=Math.atan((x-w)/(t-v)),B=wha(v,w,t,x),G=t-10*Math.cos(y);y=x-
10*Math.sin(y);var C=B[0],I=B[1],P=B[2];B=B[3];k.moveTo(v,w).lineTo(G,y)}else t=d.left+r-(d.Wb||0),x=d.top+r,y=Math.atan((x-w)/(t-v)),B=wha(v,w,t,x),G=t-10*Math.cos(y),y=x-10*Math.sin(y),C=B[0],I=B[1],P=B[2],B=B[3],k.moveTo(v,w).lineTo(G,y);p.moveTo(G,y).lineTo(C,I).lineTo(t,x).lineTo(P,B).close();l.lineTo(t,x);b&&(e=$.dn(0,0,d.left-d.Wb-e.left-e.Wb,d.top-e.top),t=this.Ec(!0,b,c,void 0),c=this.Jc().Sa().um().add(t,{value:{x:u+r,y:q+r}}),b.kX=c,c.width(e),c.height(a.height),c.rotation(b.rotation),
c.tag={w:b},r=this.Jc().Sa().jk().add(t,{value:{x:u+r,y:q+r}}),r.width(e),r.height(a.height),b.MU=r,r.rotation(b.rotation),r.tag={w:b})}this.B(49152)}this.J(32768)&&(this.ya.yj(this.Dfa,this),this.U.yj(this.dja,this),this.B(16384),this.I(32768));this.J(16384)&&(this.Pc().fi(),this.Jc().fi(),this.Fe().Pc().fi(),this.Fe().Jc().fi(),this.ya.yj(this.Efa,this),this.U.yj(this.eja,this),this.I(16384))};$.g.Ej=function(){return this.oa?!this.oa.Zb():!0};$.g.qk=function(a,b){return $.cu(this.data(),b)};
$.g.R=function(){this.Ob.length=0;this.Ra.length=0;delete this.b;delete this.g;delete this.oa;$.td(this.Pc(),this.Jc(),this.Fe());$.td(this.eb,this.ab,this.ya,this.U,this.Fh,this.ka);this.ka=this.Fh=this.U=this.ya=this.ab=this.eb=null;jZ.u.R.call(this)};$.g.F=function(){var a=jZ.u.F.call(this);this.oa&&(a.treeData=this.oa.OA());a.milestones=this.Pc().F();a.tasks=this.Jc().F();a.criticalPath=this.Fe().F();$.Hq(this,sZ,a);return{chart:a}};
$.g.X=function(a,b){jZ.u.X.call(this,a,b);this.xc=$.mm("defaultTooltip");"treeData"in a&&this.data($.Pt(a.treeData));"milestones"in a&&this.Pc().X(a.milestones,b);"tasks"in a&&this.Jc().X(a.tasks,b);"criticalPath"in a&&this.Fe().X(a.criticalPath,b);$.zq(this,sZ,a)};var tZ=jZ.prototype;tZ.getType=tZ.Na;tZ.tasks=tZ.Jc;tZ.milestones=tZ.Pc;tZ.criticalPath=tZ.Fe;tZ.data=tZ.data;tZ.toCsv=tZ.qk;$.Jp.pert=xha;$.F("anychart.pert",xha);}).call(this,$)}
