text: var DlhSoft;"undefined"===typeof DlhSoft&&(DlhSoft={assemblies:[],buildReleaseDate:new Date(1,0,1)});DlhSoft.assemblies.push({assembly:"DlhSoft.ProjectData.GanttChart.HTML.Controls",company:"DlhSoft",product:"Project Data Modern Library",version:"5.3.18.1",copyright:"Copyright \u00a9 2012-2022 DlhSoft",title:"Project Data Gantt Chart HTML Controls",description:"Project Data Gantt Chart related HTML client components"});
  DlhSoft.buildReleaseDate=function(c,U,R){c=new Date(c,U-1,R);return c>DlhSoft.buildReleaseDate?c:DlhSoft.buildReleaseDate}(2022,4,3);var _0x5c25="Licensing{undefined{string{DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.{.{length{license{push{type{content{:{lastIndexOf{substr{buildReleaseDate{charCodeAt{pow{toUpperCase{DlhSoft Component Licensing Warning{http://DlhSoft.com/Purchase.aspx{?Assemblies={,{http://www.componentsource.com/features/dlhsoft{ (version {){This component is currently licensed to be used for testing purposes only{The component is part of this assembly{To purchase a standard license for a product that includes this assembly you can use the Purchase page{ownerDocument{div{createElement{style{position: absolute; left: 24px; top: 24px; width: 480px; display: block; z-index: 1; color: Black; background-color: #ffffc0; border: solid 1px Blue; overflow: auto{setAttribute{padding: 6px; padding-top: 8px; font-family: Arial; font-size: small{font-weight: bold; margin-bottom: 4px{appendChild{createTextNode{color: Red; margin-top: 2px; margin-bottom: 2px{margin-top: 4px{a{color: Blue; text-decoration: underline{href{target{_blank{Purchase license{margin-left: 4px; color: Blue; text-decoration: underline{javascript://{Continue trial{click{removeChild{addEventListener{\n\n{: {:\n".split("{");
  void 0==DlhSoft[_0x5c25[0]]&&(DlhSoft[_0x5c25[0]]=function(){var c=_0x5c25[1],U=_0x5c25[2],R=[],W=[],O=_0x5c25[3],ka=function(u,L){if(typeof u!==U||typeof L!==U)return!1;if(L==O)return!0;var V=L[_0x5c25[11]](_0x5c25[10]);if(0<=V){var X=L[_0x5c25[12]](0,V),H,K=X[_0x5c25[11]](_0x5c25[10]);if(0<=K)try{H=new Date(parseInt(X[_0x5c25[12]](K+1)))}catch(J){}typeof H===c&&(H=new Date(2013,11,31));if(DlhSoft[_0x5c25[13]]>H)return!1;X=X+_0x5c25[10]+u;for(i=H=0;i<X[_0x5c25[5]];i++)K=X[_0x5c25[14]](i),H=(H<<5)-
  H+K,H&=H;0>H&&(H=Math[_0x5c25[15]](2,32)-H);X=H.toString(16)[_0x5c25[16]]();V=L[_0x5c25[12]](V+1);if(X==V)return!0}return!1},u=function(u,L,V,X,H){var K=_0x5c25[17],J=_0x5c25[18],T=typeof ComponentSource===c||!ComponentSource?J+_0x5c25[19]+X+_0x5c25[20]+H:_0x5c25[21],R=X+_0x5c25[22]+H+_0x5c25[23],U=_0x5c25[24],O=_0x5c25[25],x=_0x5c25[26];setTimeout(function(){var c=u[_0x5c25[27]],o=c[_0x5c25[29]](_0x5c25[28]);o[_0x5c25[32]](_0x5c25[30],_0x5c25[31]);var m=c[_0x5c25[29]](_0x5c25[28]);m[_0x5c25[32]](_0x5c25[30],
  _0x5c25[33]);var q=c[_0x5c25[29]](_0x5c25[28]);q[_0x5c25[32]](_0x5c25[30],_0x5c25[34]);m[_0x5c25[35]](q);q[_0x5c25[35]](c[_0x5c25[36]](K));m[_0x5c25[35]](c[_0x5c25[36]](U+_0x5c25[10]));q=c[_0x5c25[29]](_0x5c25[28]);q[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);q[_0x5c25[35]](c[_0x5c25[36]](L));m[_0x5c25[35]](q);m[_0x5c25[35]](c[_0x5c25[36]](O+_0x5c25[10]));q=c[_0x5c25[29]](_0x5c25[28]);q[_0x5c25[32]](_0x5c25[30],_0x5c25[37]);q[_0x5c25[35]](c[_0x5c25[36]](R));m[_0x5c25[35]](q);m[_0x5c25[35]](c[_0x5c25[36]](x+
  _0x5c25[10]));q=c[_0x5c25[29]](_0x5c25[28]);q[_0x5c25[32]](_0x5c25[30],_0x5c25[38]);var s=c[_0x5c25[29]](_0x5c25[39]);s[_0x5c25[32]](_0x5c25[30],_0x5c25[40]);s[_0x5c25[32]](_0x5c25[41],T);s[_0x5c25[32]](_0x5c25[42],_0x5c25[43]);s[_0x5c25[35]](c[_0x5c25[36]](_0x5c25[44]));q[_0x5c25[35]](s);s=c[_0x5c25[29]](_0x5c25[39]);s[_0x5c25[32]](_0x5c25[30],_0x5c25[45]);s[_0x5c25[32]](_0x5c25[41],_0x5c25[46]);s[_0x5c25[35]](c[_0x5c25[36]](_0x5c25[47]));s[_0x5c25[50]](_0x5c25[48],function(){u[_0x5c25[49]](o);W[_0x5c25[7]](V)},
  !1);q[_0x5c25[35]](s);m[_0x5c25[35]](q);o[_0x5c25[35]](m);u[_0x5c25[35]](o)},0);setTimeout(function(){alert(K+_0x5c25[51]+U+_0x5c25[52]+L+_0x5c25[51]+O+_0x5c25[53]+R+_0x5c25[51]+x+_0x5c25[4])},6E5)};return{setLicense:function(c,u){R[_0x5c25[7]]({type:c,content:u})},validate:function(O,L,V,X,H,K,J){for(var L=L+_0x5c25[4]+V,T=0;T<W[_0x5c25[5]];T++)if(W[T]==L)return;a:if(typeof K!==U&&typeof J!==c&&(J[_0x5c25[6]]!==c&&(K=J[_0x5c25[6]]),typeof J===U&&(K=J)),typeof K!==U)for(J=0;J<R[_0x5c25[5]];J++)if(T=
  R[J],T[_0x5c25[8]]==L&&typeof T[_0x5c25[9]]===U){K=T[_0x5c25[9]];break a}ka(L,K)?O[_0x5c25[6]]=K:u(O,V,L,X,H)}}}());void 0==DlhSoft.Controls&&(DlhSoft.Controls={});
  void 0==DlhSoft.Controls.GanttChartView&&(DlhSoft.Controls.GanttChartView=function(){var c="undefined",U=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],R=["January","February","March","April","May","June","July","August","September","October","November","December"],W=[31,28,31,30,31,30,31,31,30,31,30,31],O=new Date(2592E5),ka=new Date(3155762592E5),u=function(a,e,d,b,c){a.internalEventListeners&&a.internalEventListeners.push({object:e,event:d,handler:b,useCapture:c});return b},
  ca=function(a,e,d,b){function g(b){if(typeof r.x!==c&&!(a.offsetWidth<=0)){var b=r.gridWidth+(b.clientX-r.x),e=a.offsetWidth-b-3,g=Math.max(1,d.minGridWidth),n=Math.max(1,d.minChartWidth);if(b<g){e=e-(g-b);b=g}else if(e<n){b=b-(n-e);e=n}b<1&&(b=1);e<1&&(e=1);typeof y.percent!==c&&delete y.percent;b=Math.floor(b*1E6/a.offsetWidth)/1E4;y.style.width=b+"%";M.style.width=100-b+"%";d.gridWidth=y.offsetWidth+"px";d.chartWidth=M.offsetWidth+"px";Ha(r,y,d);typeof d.splitterPositionChangeHandler!==c&&setTimeout(function(){d.splitterPositionChangeHandler(y.offsetWidth,
  M.offsetWidth)},0)}}if(typeof a.ownerDocument.createElementNS===c||typeof a.ownerDocument.addEventListener===c)alert("The required HTML5 features are not supported by the application host. Some features will be unavailable. Consider upgrading.");else{var f=["DlhSoft.Controls","GanttChartView","DlhSoft.ProjectData.GanttChart.HTML.Controls","5","validate","Licensing"];DlhSoft[f[5]][f[4]](a,f[0],f[1],f[2],f[3],b,d);a.isInitializing=true;if(typeof a.initializedItems!==c){a.initializedItems.forEach(function(a){a.gridItemContainer&&
  a.gridItemContainer.parentNode&&a.gridItemContainer.parentNode.removeChild(a.gridItemContainer);a.chartItemArea&&a.chartItemArea.parentNode&&a.chartItemArea.parentNode.removeChild(a.chartItemArea);delete a.ganttChartView;delete a.chartItem;delete a.chartItemArea;delete a.gridItem;delete a.gridItemContent;delete a.gridItemSelectionContainer;delete a.gridItemContainer;delete a.alternativeContentContainer;delete a.toggleButton;delete a.parent;delete a.children;delete a.selectionInput;delete a.contentInput;
  delete a.startInput;delete a.finishInput;delete a.milestoneInput;delete a.assignmentsContentInput;delete a.completedInput;delete a.dependsOf;delete a.touchMoveHandler;delete a.touchEndHandler});typeof a.draggableItems!==c&&delete a.draggableItems;typeof a.draggableDependencyItems!==c&&delete a.draggableDependencyItems;typeof a.draggableOrderingItems!==c&&delete a.draggableOrderingItems}a.initializedItems=e.slice();a.internalEventListeners&&a.internalEventListeners.forEach(function(a){a.object.removeEventListener(a.event,
  a.handler,a.useCapture)});a.internalEventListeners=[];typeof a.settings!==c&&typeof a.settings.toggleButtonAreaWidth!==c&&delete a.settings.toggleButtonAreaWidth;if(typeof a.items!==c)for(b=0;b<a.items.length;b++)delete a.items[b].successors;typeof d!=="object"&&(d={});H(e,d);X(d,e,a);Dc(a,e,d);b=d.columns;f=d.scales;Ec(b,a,d);ea(e,a);Ma(e,d,a);if(typeof d.visibilityFilter!==c){Fc(e,d.visibilityFilter);for(var h=0,n=0;n<e.length;n++){var k=e[n];if(typeof k.ganttChartItems!==c){if(!k.isHidden)k.scheduleChartVisibilityIndex=
  h++;for(var j=0;j<k.ganttChartItems.length;j++){var l=k.ganttChartItems[j];if(k.isHidden)l.isHidden=true;l.displayRowIndex=k.scheduleChartVisibilityIndex}}}}var w=K(a,e,d),t=a.ownerDocument,h=t.createElement("div");h.setAttribute("style","font-family: Arial; font-size: small; overflow: auto");n=t.createElement("div");typeof d.containerClass!==c&&n.setAttribute("class",d.containerClass);typeof d.containerStyle!==c&&n.setAttribute("style",d.containerStyle);h.appendChild(n);k=t.createElement("div");
  k.setAttribute("style","border: solid 1px "+d.border+"; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; overflow: auto");n.appendChild(k);var y=t.createElement("div");y.setAttribute("style","overflow: auto; float: left; border-right: solid 1px "+d.border+"; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: "+d.gridWidth);d.isGridVisible&&
  k.appendChild(y);var M=t.createElement("div");M.setAttribute("style","overflow: auto; float: right; width: "+d.chartWidth);k.appendChild(M);var r=t.createElement("div");r.setAttribute("style","position: relative; opacity: 0; left: 0px; width: "+d.splitterWidth*2+"px; height: 0px; border-left: solid "+d.splitterWidth+"px "+d.splitterBackground+"; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: ew-resize; -ms-touch-action: pinch-zoom; touch-action: auto");
  r.addEventListener("mouseover",u(a,r,"mouseover",function(){r.style.opacity=1;r.isWaiting!==c&&delete r.isWaiting},true),true);r.addEventListener("mouseout",u(a,r,"mouseout",function(){if(typeof r.isWaiting===c){r.isWaiting=true;setTimeout(function(){if(typeof r.isWaiting!==c){delete r.isWaiting;if(typeof r.x===c)r.style.opacity=0}},250)}},true),true);r.addEventListener("mousedown",u(a,r,"mousedown",function(a){if(a.button==0){r.style.opacity=1;r.x=a.clientX;r.gridWidth=y.offsetWidth}},true),true);
  r.addEventListener("touchstart",u(a,r,"touchstart",function(a){a=a.touches[0];r.style.opacity=1;r.x=a.clientX;r.gridWidth=y.offsetWidth},true),true);t.addEventListener("mousemove",u(a,t,"mousemove",function(a){g(a)},true),true);t.addEventListener("touchmove",u(a,t,"touchmove",function(a){g(a.touches[0])},true),true);t.addEventListener("mouseup",u(a,t,"mouseup",function(){if(typeof r.x!==c){delete r.x;r.style.opacity=0}if(DlhSoft.Controls.ToolTip&&d.useUpdatingToolTips)(toolTip=a.toolTip)&&toolTip.hide()},
  true),true);t.addEventListener("touchend",u(a,t,"touchend",function(){if(typeof r.x!==c){delete r.x;r.style.opacity=0}},true),true);d.isGridVisible&&d.isSplitterEnabled&&k.appendChild(r);n=t.createElement("div");n.setAttribute("style","float: right; background: "+d.headerBackground+"; width: 0px; height: "+d.headerHeight+"px");y.appendChild(n);k=t.createElement("div");k.setAttribute("style","overflow: hidden; background: "+d.headerBackground+"; border-bottom: solid 1px "+d.border+"; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; height: "+
  d.headerHeight+"px");y.appendChild(k);j=t.createElement("div");j.setAttribute("style","float: right; background: "+d.headerBackground+"; width: 0px; height: "+d.headerHeight+"px");M.appendChild(j);l=t.createElement("div");l.setAttribute("style","overflow: hidden; background: "+d.headerBackground+"; border-bottom: solid 1px "+d.border+"; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; height: "+d.headerHeight+"px");M.appendChild(l);var aa=t.createElement("div");
  aa.setAttribute("style","overflow-x: "+(typeof d.isExport===c||!d.isExport?"scroll":"hidden")+"; overflow-y: "+(typeof d.isExport===c||!d.isExport?"auto":"hidden")+"; height: "+w);y.appendChild(aa);var p=t.createElement("div");p.setAttribute("style","overflow-x: "+(typeof d.isExport===c||!d.isExport?"scroll":"hidden")+"; overflow-y: "+(typeof d.isExport===c||!d.isExport?"auto":"hidden")+"; height: "+w);M.appendChild(p);var w=kb(b),o=t.createElement("div");o.setAttribute("style","background: "+d.headerBackground+
  "; border-bottom: solid 1px "+d.border+"; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: "+w+"px; overflow: hidden; height: "+d.headerHeight+"px");k.appendChild(o);var m=t.createElement("div");m.setAttribute("style","float: left; width: "+w+"px; overflow: auto"+(d.horizontalGridLines?"; border-bottom: 1px solid "+d.horizontalGridLines+"; margin-bottom: -1px; ; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box":""));aa.appendChild(m);
  if(typeof d.extraSpaceHeight!==c){var q=t.createElement("div");q.setAttribute("style","overflow: hidden; width: "+w+"px; height: "+d.extraSpaceHeight+"px");aa.appendChild(q)}var s=I(d.timelineFinish,d),v=t.createElement("div");v.setAttribute("style","background: "+d.headerBackground+"; border-bottom: solid 1px "+d.border+"; -wekbit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: "+s+"px; height: "+d.headerHeight+"px");l.appendChild(v);var x=t.createElement("div");
  x.setAttribute("style","float: left; overflow: hidden; width: "+s+"px; height: 0px");p.appendChild(x);var F=t.createElementNS("http://www.w3.org/2000/svg","svg");F.setAttribute("style","width: "+s+"px; height: 0px");w=d.styleDefinitionTemplate(a);F.appendChild(w);F.chartAreaDefinitions=w;w=t.createElementNS("http://www.w3.org/2000/svg","g");F.appendChild(w);x.chartAreaAlternativeRows=w;w=function(){setTimeout(function(){try{var a=x.chartArea,b=a.chartAreaDefinitions;a.removeChild(b);a.childNodes.length>
  0?a.insertBefore(b,a.childNodes[0]):a.appendChild(b)}catch(d){}},0)};F.addEventListener("mousedown",u(a,F,"mousedown",w,true),true);t.addEventListener("mouseup",u(a,t,"mouseup",w,true),true);a.resetChartAreaDefinitions=w;x.appendChild(F);x.chartArea=F;if(typeof d.extraSpaceHeight!==c){w=t.createElement("div");w.setAttribute("style","overflow: hidden; width: "+s+"px; height: "+d.extraSpaceHeight+"px");p.appendChild(w);p.chartExtraSpace=w}var z,A,E,B;setTimeout(function(){A=screen.deviceXDPI;z=a.isInitialized?
  -1:a.offsetWidth;E=a.isInitialized?-1:a.offsetHeight;B=M.offsetHeight},0);typeof a.splitterUpdateTimer!==c&&clearInterval(a.splitterUpdateTimer);a.splitterUpdateTimer=setInterval(function(){try{if(typeof r.x===c&&!(a.offsetWidth<=0)){var b=a.offsetWidth,e=M.offsetHeight,g=screen.deviceXDPI;if(b!=z||g!=A){var n=typeof y.percent!==c?y.percent*b:y.offsetWidth,f=M.offsetWidth,j=Math.max(1,d.minGridWidth),k=Math.max(1,d.minChartWidth);if(n<j){f=f-(j-n);n=j}else if(f<k){n=n-(k-f);f=k}n<1&&(n=1);f<1&&(f=
  1);var l=Math.floor(n*1E6/b)/1E4;y.percent=l/100;y.style.width=l+"%";M.style.width=100-l+"%";d.gridWidth=y.offsetWidth+"px";d.chartWidth=M.offsetWidth+"px";Ha(r,y,d);if(typeof d.splitterPositionChangeHandler!==c){var h=y.offsetWidth,t=M.offsetWidth;h>0&&t>0&&setTimeout(function(){d.splitterPositionChangeHandler(h,t)},0)}z=b;E=e;A=g}else if(e!=B){Ha(r,y,d);B=e}}}catch(w){try{clearInterval(a.splitterUpdateTimer)}catch(p){}}},100);typeof a.heightUpdateTimer!==c&&clearInterval(a.heightUpdateTimer);a.heightUpdateTimer=
  setInterval(function(){try{if(!(a.clientHeight<=0)){var b=a.clientHeight;if(b!=E){var c=K(a,e,d);aa.style.height=c;p.style.height=c;Ha(r,y,d);if(p.style.height!="auto")x.availableHeight=p.clientHeight;ua(x,va(e,d));wa(e,p,d);E=b=a.clientHeight}}}catch(g){try{clearInterval(a.heightUpdateTimer)}catch(n){}}},100);typeof a.scaleUpdateTimer!==c&&clearInterval(a.scaleUpdateTimer);a.chartScale=1;a.scaleUpdateTimer=setInterval(function(){try{var b=a.getItemsHeight(),d=a.gridContent.clientHeight/b;a.chartScale=
  d;a.chartContent.style.transform="scaleY("+d+") translateY(-"+(b-a.gridContent.clientHeight)/2+"px)"}catch(e){}},1E3);var D=function(b,g,n,f,j,k){var l;if(d.mouseHandler||d.mouseMoveHandler&&k=="mousemove"||d.mouseDownHandler&&k=="mousedown"||(d.clickHandler||d.itemClickHandler||d.chartClickHandler||d.chartItemClickHandler)&&k=="click"||(d.doubleClickHandler||d.itemDoubleClickHandler||d.chartDoubleClickHandler||d.chartItemDoubleClickHandler)&&k=="dblclick"){var h=b.which;!h&&b.button&&(b.button&1?
  h=1:b.button&4?h=2:b.button&2&&(h=3));l=j.getBoundingClientRect();var w=t.body,r=t.documentElement,j=l.left+(window.pageXOffset||r.scrollLeft||w.scrollLeft)-(r.clientLeft||w.clientLeft||0);l=Math.round(l.top+(window.pageYOffset||r.scrollTop||w.scrollTop)-(r.clientTop||w.clientTop||0));var j=Math.round(j),j=b.pageX-j,r=(b.pageY-l)/a.chartScale,y=l=0,M,p;if(n)for(w=0;w<e.length;w++){y=e[w];if(y.isVisible&&!(typeof y.isHidden!==c&&y.isHidden)){y=y.itemTop+d.itemHeight;if(r<=y){M=e[w];break}}}else if(g){for(var o=
  d.scales,aa=0,m,w=0;w<o.length;w++){m=o[w];(typeof m.isHeaderVisible===c||m.isHeaderVisible)&&aa++}var v=d.headerHeight;aa>0&&(v=d.headerHeight/aa);for(w=0;w<o.length;w++){m=o[w];if(typeof m.isHeaderVisible===c||m.isHeaderVisible){aa=v;if(typeof m.headerHeight!==c)aa=m.headerHeight;y=y+aa;if(r<=y){M=m;break}}}}if(g)p=Ia(j,d);else{r=d.columns;for(w=0;w<r.length;w++){y=r[w];l=l+(y.width?y.width:0);if(j<=l){p=y;break}}}d.mouseHandler&&d.mouseHandler(k,n,g,M,p,h,f,b);d.mouseMoveHandler&&k=="mousemove"&&
  d.mouseMoveHandler(n,g,M,p);d.mouseDownHandler&&k=="mousedown"&&d.mouseDownHandler(n,g,M,p,h);d.clickHandler&&k=="click"&&d.clickHandler(n,g,M,p);d.doubleClickHandler&&k=="dblclick"&&d.doubleClickHandler(n,g,M,p);d.itemClickHandler&&(k=="click"&&n&&M)&&d.itemClickHandler(g,M,p);d.itemDoubleClickHandler&&(k=="dblclick"&&n&&M)&&d.itemDoubleClickHandler(g,M,p);d.chartClickHandler&&(k=="click"&&g)&&d.chartClickHandler(n,M,p);d.chartDoubleClickHandler&&(k=="dblclick"&&g)&&d.chartDoubleClickHandler(n,M,
  p);d.chartItemClickHandler&&(k=="click"&&n&&g)&&d.chartItemClickHandler(M,p);d.chartItemDoubleClickHandler&&(k=="dblclick"&&n&&g)&&d.chartItemDoubleClickHandler(M,p)}};o.addEventListener("mousemove",u(a,o,"mousemove",function(a){D(a,false,false,0,o,"mousemove")}));o.addEventListener("mousedown",u(a,o,"mousedown",function(a){D(a,false,false,1,o,"mousedown")}));o.addEventListener("click",u(a,o,"click",function(a){D(a,false,false,1,o,"click")}));o.addEventListener("dblclick",u(a,o,"dblclick",function(a){D(a,
  false,false,2,o,"dblclick")}));m.addEventListener("mousemove",u(a,m,"mousemove",function(a){D(a,false,true,0,m,"mousemove")}));m.addEventListener("mousedown",u(a,m,"mousedown",function(a){D(a,false,true,1,m,"mousedown")}));m.addEventListener("click",u(a,m,"click",function(a){D(a,false,true,1,m,"click")}));m.addEventListener("dblclick",u(a,m,"dblclick",function(a){D(a,false,true,2,m,"dblclick")}));v.addEventListener("mousemove",u(a,v,"mousemove",function(a){D(a,true,false,0,v,"mousemove")}));v.addEventListener("mousedown",
  u(a,v,"mousedown",function(a){D(a,true,false,1,v,"mousedown")}));v.addEventListener("click",u(a,v,"click",function(a){D(a,true,false,1,v,"click")}));v.addEventListener("dblclick",u(a,v,"dblclick",function(a){D(a,true,false,2,v,"dblclick")}));x.addEventListener("mousemove",u(a,x,"mousemove",function(a){D(a,true,true,0,x,"mousemove")}));x.addEventListener("mousedown",u(a,x,"mousedown",function(a){D(a,true,true,1,x,"mousedown")}));x.addEventListener("click",u(a,x,"click",function(a){D(a,true,true,1,
  x,"click")}));x.addEventListener("dblclick",u(a,x,"dblclick",function(a){D(a,true,true,2,x,"dblclick")}));x.addEventListener("touchmove",u(a,x,"touchmove",function(b){a.draggingItem&&b.preventDefault()},true),true);m.container=aa;x.container=p;o.container=k;v.container=l;a.gridContainer=y;a.chartContainer=M;a.gridContent=m;a.chartContent=x;a.gridContentContainer=aa;a.chartContentContainer=p;a.gridHeader=o;a.chartHeader=v;a.gridHeaderContainer=k;a.chartHeaderContainer=l;a.splitter=r;p.isInitializing=
  true;w=J(e,d);Gc(a,h);if(p.style.height!="auto")x.availableHeight=p.clientHeight;Hc(o,b,d,a);lb(v,F,f,d);Ic(m,x,F,e,b,w,d,a);Ha(r,y,d);p.isInitializing=false;wa(e,p,d);p.scrollLeft=I(d.displayedTime,d);if(l.scrollLeft!=p.scrollLeft)l.scrollLeft=p.scrollLeft;Jc(a,aa,y,k,n,m,p,l,M,j,x,r,e,d);var C=false,G=function(a,b){typeof b===c&&(b=0);if(d.hourWidth!=a){C=true;var g=p.scrollLeft,n=b,f=d.hourWidth;d.hourWidth=a;typeof d.hourWidthChangeHandler!==c&&setTimeout(function(){d.hourWidthChangeHandler(d.hourWidth)},
  0);s=I(d.timelineFinish,d);v.style.width=s+"px";x.style.width=s+"px";F.style.width=s+"px";if(typeof p.chartExtraSpace!==c)p.chartExtraSpace.style.width=s+"px";var j;for(j=v.childNodes.length;j-- >0;)v.removeChild(v.childNodes[j]);var k=[];for(j=F.childNodes.length;j-- >1;){var l=F.childNodes[j];if(l!=x.chartAreaAlternativeRows){l.tag!="Scale-Highlighting"&&(l.tag!="Scale-Highlighting-CurrentTime"&&l.tag!="Scale-Separator"&&l.tag!="Scale-Separator-CurrentTime")&&k.push(l);F.removeChild(l)}}lb(v,F,
  d.scales,d);for(j=0;j<e.length;j++){l=e[j];(!d.isVirtualizing||typeof l.isVirtuallyVisible!==c&&l.isVirtuallyVisible)&&fa(l.chartItem,l,d)}for(j=k.length;j-- >0;)F.appendChild(k[j]);ua(x,va(e,d));p.scrollLeft=n*(a/f)-(n-g);setTimeout(function(){C=false},200)}};a.setHourWidth=G;if(typeof d.isMouseWheelZoomEnabled===c||d.isMouseWheelZoomEnabled){b=function(b){b.preventDefault();b.stopPropagation();if(!C){var d=typeof b.wheelDelta!==c?b.wheelDelta>=0?1:-1:typeof b.detail!==c?-b.detail>=0?1:-1:0,e=a.settings,
  g=e.hourWidth,n=typeof e.isMouseWheelZoomEnabledMinHourWidth!==c?e.isMouseWheelZoomEnabledMinHourWidth:1;if(d<0)g=g/(1.2*-d);else if(d>0){g=g*1.2*d;d=typeof e.isMouseWheelZoomEnabledMaxHourWidth!==c?e.isMouseWheelZoomEnabledMaxHourWidth:20;g>d&&(g=d)}g<n&&(g=n);G(g,b.offsetX)}};F.addEventListener("mousewheel",u(a,F,"mousewheel",b));F.addEventListener("DOMMouseScroll",u(a,F,"DOMMouseScroll",b))}a.isInitializing=false;a.isInitialized=true;return a}},L=function(a){ca(a,a.items,a.settings,a.license)},
  V=function(a){if(typeof a.dateTimePickerType===c)a.dateTimePickerType="text";if(typeof a.useDatePicker===c)a.useDatePicker=true;if(typeof a.useTimePicker===c)a.useTimePicker=true;if(typeof a.useResourceSelector===c)a.useResourceSelector=true;if(typeof a.useUpdatingToolTips===c)a.useUpdatingToolTips=true;if(typeof a.dateFormatter===c)a.dateFormatter=da;if(typeof a.dateTimeFormatter===c)a.dateTimeFormatter=ta;if(typeof a.dateTimeParser===c)a.dateTimeParser=p;if(typeof a.itemPropertyChangeHandler===
  c)a.itemPropertyChangeHandler=function(){};if(typeof a.target===c)a.target="Standard";if(typeof a.theme===c)a.theme="Modern";if(typeof a.isGridVisible===c)switch(a.target){default:a.isGridVisible=true;break;case "Phone":a.isGridVisible=false}if(typeof a.interaction===c)a.interaction=a.target!="Phone"?"Standard":"TouchEnabled";if(typeof a.isSplitterEnabled===c)a.isSplitterEnabled=true;if(typeof a.isReadOnly===c)a.isReadOnly=false;if(typeof a.isGridReadOnly===c)a.isGridReadOnly=false;if(typeof a.isChartReadOnly===
  c)a.isChartReadOnly=false;if(typeof a.isContentReadOnly===c)a.isContentReadOnly=false;if(typeof a.isAssignmentsContentReadOnly===c)a.isAssignmentsContentReadOnly=false;if(typeof a.isIndividualItemNonworkingTimeHighlighted===c)a.isIndividualItemNonworkingTimeHighlighted=false;if(typeof a.areTaskInterruptionsHighlighted===c)a.areTaskInterruptionsHighlighted=false;if(typeof a.areTaskDependencyConstraintsEnabled===c)a.areTaskDependencyConstraintsEnabled=false;if(typeof a.alwaysHandleInvalidDependencies===
  c)a.alwaysHandleInvalidDependencies=false;if(typeof a.selectionMode===c)a.selectionMode="Focus";if(typeof a.isVirtualizing===c)a.isVirtualizing=true},X=function(a,e,d){V(a);if(typeof a.gridWidth===c)a.gridWidth="35%";if(typeof a.chartWidth===c)a.chartWidth=a.isGridVisible?"65%":"100%";if(typeof a.minGridWidth===c)a.minGridWidth=32;if(typeof a.minColumnWidth===c)a.minColumnWidth=32;if(typeof a.minChartWidth===c)a.minChartWidth=36;if(typeof a.border===c)switch(a.theme){default:a.border="#e0e0e0";break;
  case "ModernBordered":case "Aero":a.border="#9a9a9a"}if(typeof a.splitterWidth===c)a.splitterWidth=4;if(typeof a.splitterBackground===c)a.splitterBackground=a.border;if(typeof a.indentationLevelWidth===c)a.indentationLevelWidth=16;if(typeof a.itemHeight===c)a.itemHeight=21;if(typeof a.headerBackground===c)a.headerBackground="#f4f4f4";if(typeof a.headerHeight===c)a.headerHeight=42;if(typeof a.columns===c)a.columns=q(e,a);if(typeof a.toggleButtonStyle===c&&a.toggleButtonClass==null)a.toggleButtonStyle=
  "fill: Gray";if(typeof a.toggleButtonHoveringStyle===c&&a.toggleButtonHoveringClass==null)a.toggleButtonHoveringStyle="fill: Black";if(typeof a.collapsedToggleButtonTemplate===c)a.collapsedToggleButtonTemplate=Hb(d,a);if(typeof a.expandedToggleButtonTemplate===c)a.expandedToggleButtonTemplate=Ib(d,a);if(typeof a.gridLines!==c){if(typeof a.horizontalGridLines===c)a.horizontalGridLines=a.gridLines;if(typeof a.verticalGridLines===c)a.verticalGridLines=a.gridLines;if(typeof a.horizontalChartLines===c)a.horizontalChartLines=
  a.gridLines}if(typeof a.itemStyle===c&&typeof a.horizontalGridLines!==c){a.itemStyle="border-top: solid 1px "+a.horizontalGridLines+"; margin-top: -1px; -wekbit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box";if(typeof a.cellStyle===c)a.cellStyle=typeof a.verticalGridLines!==c?"border-right: solid 1px "+a.verticalGridLines+"; height: "+a.itemHeight+"px; padding-top: 2px; padding-left: 2px":"height: "+a.itemHeight+"px; padding-top: 2px"}if(typeof a.cellStyle===c&&typeof a.verticalGridLines!==
  c)a.cellStyle="border-right: solid 1px "+a.verticalGridLines+"; height: "+a.itemHeight+"px; padding-top: 3px; padding-left: 2px";if(typeof a.selectedItemStyle===c&&a.selectedItemClass==null)switch(a.theme){default:a.selectedItemStyle=typeof a.horizontalGridLines!==c||typeof a.verticalGridLines===c?"background-color: #f4f4f4; border-top: solid 1px "+(typeof a.horizontalGridLines!==c?a.horizontalGridLines:"White")+"; margin-top: -1px; -wekbit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box":
  "background-color: #f4f4f4";break;case "Aero":a.selectedItemStyle=typeof a.horizontalGridLines!==c||typeof a.verticalGridLines===c?"background-color: LightBlue; border-top: solid 1px "+(typeof a.horizontalGridLines!==c?a.horizontalGridLines:"White")+"; margin-top: -1px; -wekbit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box":"background-color: LightBlue"}if(typeof a.summaryItemStyle===c&&a.summaryItemClass==null)a.summaryItemStyle="font-weight: bold";if(typeof a.daysOfWeek===
  c)a.daysOfWeek=U;if(typeof a.months===c)a.months=R;if(typeof a.weekStartDay===c)a.weekStartDay=0;if(typeof a.currentTime===c)a.currentTime=new Date;else if(typeof a.currentTime==="string")try{a.currentTime=new Date(a.currentTime)}catch(b){a.currentTime=new Date(parseInt(a.currentTime))}if(typeof a.displayedTime==="string")try{a.displayedTime=new Date(a.displayedTime)}catch(g){a.displayedTime=new Date(parseInt(a.displayedTime))}if(typeof a.timelineStart==="string")try{a.timelineStart=new Date(a.timelineStart)}catch(f){a.timelineStart=
  new Date(parseInt(a.timelineStart))}if(typeof a.timelineFinish==="string")try{a.timelineFinish=new Date(a.timelineFinish)}catch(h){a.timelineFinish=new Date(parseInt(a.timelineFinish))}if(typeof a.isRelativeToTimezone===c||a.isRelativeToTimezone){a.currentTime=new Date(a.currentTime.valueOf()-a.currentTime.getTimezoneOffset()*6E4);if(typeof a.displayedTime!==c)a.displayedTime=new Date(a.displayedTime.valueOf()-a.displayedTime.getTimezoneOffset()*6E4);if(typeof a.timelineStart!==c)a.timelineStart=
  new Date(a.timelineStart.valueOf()-a.timelineStart.getTimezoneOffset()*6E4);if(typeof a.timelineFinish!==c)a.timelineFinish=new Date(a.timelineFinish.valueOf()-a.timelineFinish.getTimezoneOffset()*6E4);if(typeof a.scales!==c)for(e=0;e<a.scales.length;e++){var n=a.scales[e];if(typeof n.intervals!==c)for(var k=0;k<n.intervals.length;k++){var j=n.intervals[k];if(typeof j.start!==c)j.start=new Date(j.start.valueOf()-j.start.getTimezoneOffset()*6E4);if(typeof j.finish!==c)j.finish=new Date(j.finish.valueOf()-
  j.finish.getTimezoneOffset()*6E4)}}a.isRelativeToTimezone=false}if(typeof a.schedule!==c&&a.schedule!=null){if(a.schedule!=a.previousSchedule||a.schedule.workingWeekStart!=a.previousSchedule.workingWeekStart)a.workingWeekStart=a.schedule.workingWeekStart;if(a.schedule!=a.previousSchedule||a.schedule.workingWeekFinish!=a.previousSchedule.workingWeekFinish)a.workingWeekFinish=a.schedule.workingWeekFinish;if(a.schedule!=a.previousSchedule||a.schedule.workingDayStart!=a.previousSchedule.workingDayStart)a.visibleDayStart=
  a.schedule.workingDayStart;if(a.schedule!=a.previousSchedule||a.schedule.workingDayFinish!=a.previousSchedule.workingDayFinish)a.visibleDayFinish=a.schedule.workingDayFinish;if(a.schedule!=a.previousSchedule||a.schedule.specialNonworkingDays!=a.previousSchedule.specialNonworkingDays)a.specialNonworkingDays=a.schedule.specialNonworkingDays}a.timelineStart=typeof a.timelineStart===c?new Date(xa(a.currentTime,a.weekStartDay).valueOf()-6048E5):xa(a.timelineStart,a.weekStartDay);a.timelineFinish=typeof a.timelineFinish===
  c?new Date(xa(a.currentTime,a.weekStartDay).valueOf()+320544E5):mb(a.timelineFinish,a.weekStartDay);if(!a.isExport&&typeof a.specialNonworkingDays!==c)for(e=0;e<a.specialNonworkingDays.length;e++)a.specialNonworkingDays[e]=Y(new Date(a.specialNonworkingDays[e].valueOf()-(a.specialNonworkingDays[e].getTimezoneOffset()<0?a.specialNonworkingDays[e].getTimezoneOffset():0)*6E4));if(!a.isExport&&typeof a.resourceSchedules!==c)for(n=0;n<a.resourceSchedules.length;n++){k=a.resourceSchedules[n].value;if(typeof k.specialNonworkingDays!==
  c)for(e=0;e<k.specialNonworkingDays.length;e++)k.specialNonworkingDays[e]=Y(new Date(k.specialNonworkingDays[e].valueOf()-(k.specialNonworkingDays[e].getTimezoneOffset()<0?k.specialNonworkingDays[e].getTimezoneOffset():0)*6E4))}if(typeof a.scales===c)a.scales=Jb(a);if(typeof a.updateScale===c)a.updateScale=9E5;if(typeof a.hourWidth===c)a.hourWidth=2.5;if(typeof a.displayedTime===c){a.displayedTime=a.currentTime;setTimeout(function(){var b=d.chartContentContainer.scrollLeft-a.hourWidth*12;if(d.chartContentContainer.scrollLeft-
  b<d.chartContentContainer.clientWidth/3)d.chartContentContainer.scrollLeft=Math.max(0,b)},0)}a.previousSchedule=a.schedule;if(typeof a.visibleDayStart===c)a.visibleDayStart=288E5;if(typeof a.visibleDayFinish===c)a.visibleDayFinish=576E5;if(a.visibleDayStart>=a.visibleDayFinish){a.visibleWeekStart=0;a.visibleWeekFinish=864E5}if(typeof a.visibleWeekStart===c)a.visibleWeekStart=0;if(typeof a.visibleWeekFinish===c)a.visibleWeekFinish=6;if(a.visibleWeekStart>a.visibleWeekFinish)if(a.visibleWeekStart==
  a.visibleWeekFinish+1){a.visibleWeekStart=0;a.visibleWeekFinish=6}else a.visibleWeekFinish=a.visibleWeekStart;if(typeof a.workingWeekStart===c)a.workingWeekStart=1;if(typeof a.workingWeekFinish===c)a.workingWeekFinish=5;if(a.workingWeekStart>a.workingWeekFinish)if(a.workingWeekStart==a.workingWeekFinish+1){a.workingWeekStart=0;a.workingWeekFinish=6}else a.workingWeekFinish=a.workingWeekStart;a.workingDayStart=a.visibleDayStart;a.workingDayFinish=a.visibleDayFinish;if(typeof a.barHeight===c)a.barHeight=
  typeof a.barMargin===c?a.itemHeight/2:a.itemHeight-2*a.barMargin;if(typeof a.barMargin===c)a.barMargin=(a.itemHeight-a.barHeight)/2;if(typeof a.barCornerRadius===c)switch(a.theme){default:a.barCornerRadius=0;break;case "Aero":a.barCornerRadius=3}if(typeof a.completedBarMargin===c)a.completedBarMargin=a.barHeight/2.5;if(typeof a.completedBarHeight===c)a.completedBarHeight=a.barHeight-a.completedBarMargin*2;if(typeof a.completedBarCornerRadius===c)a.completedBarCornerRadius=0;a.completedBarCornerRadius=
  Math.min(a.completedBarCornerRadius,Math.max(0,a.barCornerRadius-1));if(typeof a.styleDefinitionTemplate===c)a.styleDefinitionTemplate=Kb(d,a);if(typeof a.standardBarStyle===c&&a.standardBarClass==null)switch(a.theme){default:a.standardBarStyle="fill: #8abbed; fill-opacity: 0.8; stroke: #8abbed; stroke-width: 0.65px";break;case "ModernBordered":a.standardBarStyle="fill: #8abbed; fill-opacity: 0.8; stroke: Blue; stroke-width: 0.65px";break;case "Aero":a.standardBarStyle="fill: url(#BlueGradient); fill-opacity: 0.8; stroke: Blue"}if(typeof a.standardCompletedBarStyle===
  c&&a.standardCompletedBarClass==null)switch(a.theme){default:a.standardCompletedBarStyle="fill: #3b87d9; stroke: #3b87d9; stroke-width: 0.65px";break;case "Aero":a.standardCompletedBarStyle="fill: #808080; stroke: #202020; stroke-width: 0.65px"}if(typeof a.summaryBarStyle===c&&a.summaryBarClass==null)switch(a.theme){default:a.summaryBarStyle="fill: #607080; stroke: #607080; stroke-width: 0.65px";break;case "ModernBordered":a.summaryBarStyle="fill: #607080; stroke: #202020; stroke-width: 0.65px";break;
  case "Aero":a.summaryBarStyle="fill: url(#BlackGradient); stroke: Black"}if(typeof a.summaryCompletedBarStyle===c&&a.summaryCompletedBarClass==null)switch(a.theme){default:a.summaryCompletedBarStyle="fill: #404040; stroke: #404040; stroke-width: 0.65px";break;case "Aero":a.summaryCompletedBarStyle="fill: #a0a0a0; stroke: #303030; stroke-width: 0.65px"}if(typeof a.collapsedSummaryLineStyle===c&&a.collapsedSummaryLineClass==null)a.collapsedSummaryLineStyle="stroke: #3b87d9; stroke-width: 0.65px; stroke-dasharray: 2 2";
  if(typeof a.milestoneBarStyle===c&&a.milestoneBarClass==null)switch(a.theme){default:a.milestoneBarStyle="fill: #607080; stroke: #607080; stroke-width: 0.65px";break;case "ModernBordered":a.milestoneBarStyle="fill: #607080; stroke: #202020; stroke-width: 0.65px";break;case "Aero":a.milestoneBarStyle="fill: url(#BlackGradient); stroke: Black"}if(typeof a.baselineBarStyle===c&&a.baselineBarClass==null)switch(a.theme){default:a.baselineBarStyle="fill: none; stroke: #3b87d9; stroke-width: 0.65px; stroke-dasharray: 2, 2";
  break;case "Aero":a.baselineBarStyle="fill: none; stroke: Blue; stroke-dasharray: 2, 2"}if(typeof a.dependencyPointerStyle===c&&a.dependencyPointerClass==null)switch(a.theme){default:a.dependencyPointerStyle="fill: #3b87d9; stroke: #3b87d9; stroke-width: 0.65px";break;case "Aero":a.dependencyPointerStyle="fill: Blue; stroke: Blue"}if(typeof a.dependencyLineStyle===c&&a.dependencyLineClass==null)switch(a.theme){default:a.dependencyLineStyle="stroke: #3b87d9; stroke-width: 0.65px; fill: none; marker-end: url(#ArrowMarker)";
  break;case "Aero":a.dependencyLineStyle="stroke: Blue; stroke-width: 0.65px; fill: none; marker-end: url(#ArrowMarker)"}if(typeof a.dependencyLineZoneStyle===c&&a.dependencyLineZoneClass==null)a.dependencyLineZoneStyle="stroke: White; stroke-opacity: 0; stroke-width: 4px; fill: none";if(typeof a.temporaryDependencyLineStyle===c&&a.temporaryDependencyLineClass==null)switch(a.theme){default:a.temporaryDependencyLineStyle="stroke: #3b87d9; stroke-width: 0.65px; stroke-dasharray: 2, 2; fill: none; marker-end: url(#ArrowMarker)";
  break;case "Aero":a.temporaryDependencyLineStyle="stroke: Blue; stroke-width: 0.65px; stroke-dasharray: 2, 2; fill: none; marker-end: url(#ArrowMarker)"}if(typeof a.assignmentsStyle===c&&a.assignmentsClass==null)a.assignmentsStyle="stroke-width: 0.25px; font-size: x-small";if(typeof a.standardTaskTemplate===c)a.standardTaskTemplate=Lb();if(typeof a.summaryTaskTemplate===c)a.summaryTaskTemplate=Mb();if(typeof a.milestoneTaskTemplate===c)a.milestoneTaskTemplate=Nb();if(typeof a.horizontalChartLines!==
  c){var l=a.internalPreTaskTemplate;a.internalPreTaskTemplate=function(b){if(typeof b.scheduleChartItem!==c)return typeof l!==c?l(b):null;var d=b.ganttChartView.ownerDocument,e=d.createElementNS("http://www.w3.org/2000/svg","g");typeof l!==c&&e.appendChild(l(b));var g=d.createElementNS("http://www.w3.org/2000/svg","line");g.setAttribute("x1",0);g.setAttribute("y1",-0.5);g.setAttribute("x2",I(a.timelineFinish,a));g.setAttribute("y2",-0.5);g.setAttribute("style","stroke: "+a.horizontalChartLines+"; stroke-width: 0.5px");
  e.appendChild(g);if(b.index==b.ganttChartView.items.length-1){g=d.createElementNS("http://www.w3.org/2000/svg","line");g.setAttribute("x1",0);g.setAttribute("y1",a.itemHeight+0.5);g.setAttribute("x2",I(a.timelineFinish,a));g.setAttribute("y2",a.itemHeight+0.5);g.setAttribute("style","stroke: "+a.horizontalChartLines+"; stroke-width: 0.5px");e.appendChild(g)}return e}}if(typeof a.isTaskToolTipVisible===c)switch(a.target){default:a.isTaskToolTipVisible=true;break;case "Phone":a.isTaskToolTipVisible=
  false}if(typeof a.itemTemplate===c)a.itemTemplate=Ob(a);if(typeof a.areTaskAssignmentsVisible===c)a.areTaskAssignmentsVisible=true;if(typeof a.assignmentsTemplate===c)a.assignmentsTemplate=Pb();if(typeof a.isTaskCompletedEffortVisible===c)a.isTaskCompletedEffortVisible=true;if(typeof a.areTaskDependenciesVisible===c)a.areTaskDependenciesVisible=true;if(typeof a.dependencyLineTemplate===c)a.dependencyLineTemplate=Qb();if(typeof a.isDependencyToolTipVisible===c)a.isDependencyToolTipVisible=a.isTaskToolTipVisible;
  if(typeof a.predecessorItemTemplate===c)a.predecessorItemTemplate=Rb(a);if(typeof a.isDraggingTaskStartEndsEnabled===c)a.isDraggingTaskStartEndsEnabled=true;if(typeof a.areTaskDependencyConstraintsEnabledWhileDragging===c)a.areTaskDependencyConstraintsEnabledWhileDragging=false;if(typeof a.isTaskStartReadOnly===c)a.isTaskStartReadOnly=false;if(typeof a.isTaskEffortReadOnly===c)a.isTaskEffortReadOnly=false;if(typeof a.isTaskCompletionReadOnly===c)a.isTaskCompletionReadOnly=false;if(typeof a.areTaskPredecessorsReadOnly===
  c)a.areTaskPredecessorsReadOnly=false;if(typeof a.isBaselineVisible===c)a.isBaselineVisible=true;if(typeof a.areStandardTaskLabelsVisible===void 0)a.areStandardTaskLabelsVisible=false;if(typeof a.areSummaryTaskLabelsVisible===void 0)a.areSummaryTaskLabelsVisible=false;if(typeof a.areMilestoneTaskLabelsVisible===void 0)a.areMilestoneTaskLabelsVisible=false;if(typeof a.isSummaryTaskCompletedEffortVisible===c)a.isSummaryTaskCompletedEffortVisible=false;var w=null;if(a.isIndividualItemNonworkingTimeHighlighted||
  a.areTaskInterruptionsHighlighted)for(e=0;e<a.scales.length;e++)if(a.scales[e].scaleType=="NonworkingTime"){w=a.scales[e];break}if(w!=null&&a.isIndividualItemNonworkingTimeHighlighted){var t=a.internalPreTaskTemplate;a.internalPreTaskTemplate=function(b){if(typeof b.scheduleChartItem!==c)return typeof t!==c?t(b):null;var d;d=D(b);if(typeof d===c)d=null;else{var e=[],g,n;g=nb(a.timelineStart,typeof d.workingWeekStart!==c?d.workingWeekFinish:a.workingWeekFinish);for(n=ob(g,typeof d.workingWeekFinish!==
  c?d.workingWeekStart:a.workingWeekStart);g<a.timelineFinish;g=ya(g),n=ya(n))e.push({start:g,finish:n});if(typeof d.specialNonworkingDays!==c)for(var f=0;f<d.specialNonworkingDays.length;f++){g=d.specialNonworkingDays[f];n=ba(g);e.push({start:g,finish:n})}d=e}if(d==null||d.length==0)return typeof t!==c?t(b):null;e=b.ganttChartView.ownerDocument;g=e.createElementNS("http://www.w3.org/2000/svg","g");for(n=0;n<d.length;n++){var f=d[n],j=f.finish,f=I(f.start,a),j=I(j,a)-f;if(!(j<=0)){var k=e.createElementNS("http://www.w3.org/2000/svg",
  "rect");k.setAttribute("x",f-1);k.setAttribute("y",0);k.setAttribute("width",j);k.setAttribute("height",a.itemHeight);k.setAttribute("class",w.highlightingClass);k.setAttribute("style",w.highlightingStyle);g.appendChild(k)}}typeof t!==c&&g.appendChild(t(b));return g}}if(w!=null&&a.areTaskInterruptionsHighlighted){var y=a.internalExtraTaskTemplate;a.internalExtraTaskTemplate=function(b){if(typeof b.scheduleChartItem!==c)return typeof y!==c?y(b):null;var d;if(b.hasChildren&&(typeof b.isSummaryEnabled===
  c||b.isSummaryEnabled)||b.isMilestone)d=null;else{var e=D(b);d=[];var g,n;g=nb(Y(b.start),typeof e!==c&&typeof e.workingWeekStart!==c?e.workingWeekFinish:a.workingWeekFinish);for(n=ob(g,typeof e!==c&&typeof e.workingWeekFinish!==c?e.workingWeekStart:a.workingWeekStart);g<b.finish;g=ya(g),n=ya(n))d.push({start:g>=b.start?g:b.start,finish:n<=b.finish?n:b.finish});e=typeof e!==c&&typeof e.specialNonworkingDays!==c?e.specialNonworkingDays:a.specialNonworkingDays;if(typeof e!==c)for(var f=0;f<e.length;f++){g=
  e[f];n=ba(g);g>=b.start&&n<=b.finish&&d.push({start:g,finish:n})}}if(d==null||d.length==0)return typeof y!==c?y(b):null;g=b.ganttChartView.ownerDocument;n=g.createElementNS("http://www.w3.org/2000/svg","g");for(e=0;e<d.length;e++){var f=d[e],j=f.finish,f=I(f.start,a),j=I(j,a)-f;if(!(j<=0)){var k=g.createElementNS("http://www.w3.org/2000/svg","rect");k.setAttribute("x",f-1);k.setAttribute("y",a.barMargin);k.setAttribute("width",j);k.setAttribute("height",a.barHeight);k.setAttribute("class",w.highlightingClass);
  k.setAttribute("style",w.highlightingStyle);n.appendChild(k)}}typeof y!==c&&n.appendChild(y(b));return n}}},H=function(a,e){for(var d=0;d<a.length;d++){var b=a[d];if(typeof b==="string"){b={content:b};a[d]=b}if(typeof b.indentation==="string")b.indentation=parseInt(b.indentation);if(typeof b.isExpanded==="string")b.isExpanded=b.isExpanded.toLowerCase()=="true";if(typeof b.start==="string"){try{b.start=new Date(b.start)}catch(g){b.start=new Date(parseInt(b.start))}if(typeof e.isRelativeToTimezone===
  c||e.isRelativeToTimezone)b.start=new Date(b.start.valueOf()+b.start.getTimezoneOffset()*6E4);b.preferredStart=b.start}if(typeof b.finish==="string"){try{b.finish=new Date(b.finish)}catch(f){b.finish=new Date(parseInt(b.finish))}if(typeof e.isRelativeToTimezone===c||e.isRelativeToTimezone)b.finish=new Date(b.finish.valueOf()+b.finish.getTimezoneOffset()*6E4)}if(typeof b.completedFinish==="string"){try{b.completedFinish=new Date(b.completedFinish)}catch(h){b.completedFinish=new Date(parseInt(b.completedFinish))}if(typeof e.isRelativeToTimezone===
  c||e.isRelativeToTimezone)b.completedFinish=new Date(b.completedFinish.valueOf()+b.completedFinish.getTimezoneOffset()*6E4)}if(typeof b.isMilestone==="string")b.isMilestone=b.isMilestone.toLowerCase()=="true";if(typeof b.baselineStart==="string"){try{b.baselineStart=new Date(b.baselineStart)}catch(n){b.baselineStart=new Date(parseInt(b.baselineStart))}if(typeof e.isRelativeToTimezone===c||e.isRelativeToTimezone)b.baselineStart=new Date(b.baselineStart.valueOf()+b.baselineStart.getTimezoneOffset()*
  6E4)}if(typeof b.baselineFinish==="string"){try{b.baselineFinish=new Date(b.baselineFinish)}catch(k){b.baselineFinish=new Date(parseInt(b.baselineFinish))}if(typeof e.isRelativeToTimezone===c||e.isRelativeToTimezone)b.baselineFinish=new Date(b.baselineFinish.valueOf()+b.baselineFinish.getTimezoneOffset()*6E4)}if(typeof b.minStart==="string"){try{b.minStart=new Date(b.minStart)}catch(j){b.minStart=new Date(parseInt(b.minStart))}if(typeof e.isRelativeToTimezone===c||e.isRelativeToTimezone)b.minStart=
  new Date(b.minStart.valueOf()+b.minStart.getTimezoneOffset()*6E4)}if(typeof b.maxStart==="string"){try{b.maxStart=new Date(b.maxStart)}catch(l){b.maxStart=new Date(parseInt(b.maxStart))}if(typeof e.isRelativeToTimezone===c||e.isRelativeToTimezone)b.maxStart=new Date(b.maxStart.valueOf()+b.maxStart.getTimezoneOffset()*6E4)}if(typeof b.minFinish==="string"){try{b.minFinish=new Date(b.minFinish)}catch(w){b.minFinish=new Date(parseInt(b.minFinish))}if(typeof e.isRelativeToTimezone===c||e.isRelativeToTimezone)b.minFinish=
  new Date(b.minFinish.valueOf()+b.minFinish.getTimezoneOffset()*6E4)}if(typeof b.maxFinish==="string"){try{b.maxFinish=new Date(b.maxFinish)}catch(t){b.maxFinish=new Date(parseInt(b.maxFinish))}if(typeof e.isRelativeToTimezone===c||e.isRelativeToTimezone)b.maxFinish=new Date(b.maxFinish.valueOf()+b.maxFinish.getTimezoneOffset()*6E4)}if(typeof b.predecessors!==c){if(typeof b.predecessors==="string")b.predecessors=b.predecessors.split(",");for(var y=0;y<b.predecessors.length;y++){var p=b.predecessors[y];
  if(typeof p==="string"){p={item:p};b.predecessors[y]=p}if(typeof p.item==="string"){var r=parseInt(p.item)-1;p.item=r>=0&&r<a.length?a[r]:null}if(typeof p.lag==="string")p.lag=parseFloat(p.lag)}}if(typeof b.schedule!==c&&typeof b.schedule.specialNonworkingDays!==c)for(y=0;y<b.schedule.specialNonworkingDays.length;y++)b.schedule.specialNonworkingDays[y]=Y(new Date(b.schedule.specialNonworkingDays[y].valueOf()-b.schedule.specialNonworkingDays[y].getTimezoneOffset()*6E4));typeof b.wasGridItemContentLoaded!==
  c&&delete b.wasGridItemContentLoaded}},K=function(a,e,d){var b;if(a.isContentHeightInitialized&&a.isContentHeightAuto)b=e.length>0?"auto":d.itemHeight+"px";else{var c=a.clientHeight-d.headerHeight-2;c<0&&(c=0);b=c+"px";if(c<d.itemHeight){if(!a.isContentHeightInitialized)a.isContentHeightAuto=true;b=e.length>0?"auto":d.itemHeight+"px"}a.isContentHeightInitialized=true}return b},J=function(a,e){if(typeof e.toggleButtonAreaWidth!==c)return e.toggleButtonAreaWidth;var d=0;if(e.isGridVisible)for(var b=
  0;b<a.length;b++)if((typeof a[b].scheduleChartItem===c||a[b].scheduleChartItem==a[b])&&a[b].indentation>0){d=16;break}return e.toggleButtonAreaWidth=d},T=function(a,e){var d=a.createElement("span");d.innerHTML=e;return d},ia=function(a,e){return e==true?a.createTextNode("\u2713"):a.createTextNode("")},da=function(a){var e=a.getFullYear(),d=a.getMonth()+1;d<10&&(d="0"+d);a=a.getDate();a<10&&(a="0"+a);return d+"/"+a+"/"+e},ta=function(a){var e=da(a),d=a.getHours();d<10&&(d="0"+d.toString());a=a.getMinutes();
  a<10&&(a="0"+a.toString());return e+" "+d+":"+a},x=function(a){return new Date(a.valueOf()+a.getTimezoneOffset()*6E4)},p=function(a){var e=new Date;if(a==null||a=="")return e;var d,b,c,f;c=a.indexOf(" ");if(c>=0){d=a.substr(0,c);f=a.substr(c+1)}else{d=a;f="0"}c=d.indexOf("/");if(c>=0){for(a=d.substr(0,c);a.length>0&&a.substr(0,1)=="0";)a=a.substr(1);a=parseInt(a)-1;d=d.substr(c+1);c=d.indexOf("/");if(c>=0){b=d.substr(0,c);for(c=d.substr(c+1);c.length>0&&c.substr(0,1)=="0";)c=c.substr(1);d=parseInt(c)}else{b=
  d;d=e.getFullYear()}for(;b.length>0&&b.substr(0,1)=="0";)b=b.substr(1);b=parseInt(b)}else{for(;d.length>0&&d.substr(0,1)=="0";)d=d.substr(1);b=parseInt(d);a=e.getMonth();d=e.getFullYear()}var h;c=f.indexOf(":");if(c>=0){h=f.substr(0,c);f=f.substr(c+1)}else{h=f;f="0"}for(;h.length>1&&h.substr(0,1)=="0";)h=h.substr(1);for(c=parseInt(h);f.length>1&&f.substr(0,1)=="0";)f=f.substr(1);f=parseInt(f);return isNaN(d)||isNaN(a)||isNaN(b)||d<=0||a<0||a>=12||b<1||b>W[a]+(a!=1||!(d%400==0||(d%100==0?0:d%4==0))?
  0:1)?isNaN(c)||isNaN(f)||c<0||c>=24||f<0||f>=60?e:new Date(e.getFullYear(),e.getMonth(),e.getDate(),c,f,0,0):isNaN(c)||isNaN(f)||c<0||c>=24||f<0||f>=60?new Date(d,a,b,0,0,0,0):new Date(d,a,b,c,f,0,0)},o=function(a){return new Date(a.valueOf()-a.getTimezoneOffset()*6E4)},m=function(a,e){var d=a.ownerDocument,b=d.createElementNS("http://www.w3.org/2000/svg","svg");b.setAttribute("style","width: 12px; height: 12px; vertical-align: initial");b.setAttribute("focusable","false");d=d.createElementNS("http://www.w3.org/2000/svg",
  "rect");d.setAttribute("id","PART_Border");d.setAttribute("width","12");d.setAttribute("height","12");d.setAttribute("style","fill: White; fill-opacity: 0");b.appendChild(d);a.setAttribute("id","PART_Button");typeof e.toggleButtonClass!==c&&a.setAttribute("class",e.toggleButtonClass);typeof e.toggleButtonStyle!==c&&a.setAttribute("style",e.toggleButtonStyle);b.appendChild(a);return b},q=function(a,e){typeof e!=="object"&&(e={});V(e);var d=[{header:"",width:32,isSelection:true},{header:"Task",width:140,
  isTreeView:true},{header:"Start",width:140},{header:"Finish",width:140},{header:"Milestone",width:80},{header:"Completed",width:80},{header:"Assignments",width:200}];d[0].cellTemplate=s(e,d[0],a);d[1].cellTemplate=E(e,d[1],a);d[1].exportCellTemplate=E(e,d[1],a,false);d[2].cellTemplate=Sb(e,d[2]);d[2].exportCellTemplate=Sb(e,d[2],false);d[3].cellTemplate=Tb(e,d[3]);d[3].exportCellTemplate=Tb(e,d[3],false);d[4].cellTemplate=G(e,d[4]);d[4].exportCellTemplate=G(e,d[4],false);d[5].cellTemplate=Ub(e,d[5]);
  d[5].exportCellTemplate=Ub(e,d[5],false);d[6].cellTemplate=Vb(e,d[6]);d[6].exportCellTemplate=Vb(e,d[6],false);e.selectionMode!="Single"&&(e.selectionMode!="Extended"&&e.selectionMode!="ExtendedFocus")&&d.splice(0,1);return d},s=function(a,e,d){return function(b){return!e.isReadOnly?F(b,a,d):ia(b.ganttChartView.ownerDocument,b.isSelected)}},F=function(a,e){var d=a.ganttChartView.ownerDocument,b;if(typeof a.selectionInput===c){b=d.createElement("input");a.selectionInput=b;b.type="checkbox";b.setAttribute("style",
  "margin: 0px")}else b=a.selectionInput;if(a.isSelected){b.setAttribute("checked","checked");if(!b.checked)b.checked=true}else if(b.checked)b.checked=false;var g=function(){b.checked?v(a,true,e.selectionMode):v(a,false,e.selectionMode)};typeof b.changeEventListener!==c&&b.removeEventListener("change",b.changeEventListener,true);b.addEventListener("change",g,true);b.changeEventListener=g;d=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();g(a)}};typeof b.keyPressEventListener!==c&&
  b.removeEventListener("keypress",b.keyPressEventListener,true);b.addEventListener("keypress",d,true);b.keyPressEventListener=d;return b},v=function(a,e,d){a.isSelected=e;A(a,"isSelected",true,true);Wb(a);if(typeof a.ganttChartView!==c){a.ganttChartView.selectedItem=a;if(d!="Extended"&&d!="ExtendedFocus")a.ganttChartView.selectedItems=[a];var b;if(d!="Extended"&&d!="ExtendedFocus")for(b=0;b<a.ganttChartView.items.length;b++){e=a.ganttChartView.items[b];if(e!=a&&e.isSelected){e.isSelected=false;A(e,
  "isSelected",false,true);Wb(e)}}}if(typeof a.ganttChartView!==c&&(d=="Extended"||d=="ExtendedFocus")){d=[];for(b=0;b<a.ganttChartView.items.length;b++){e=a.ganttChartView.items[b];e.isSelected&&d.push(e)}a.ganttChartView.selectedItems=d}},z=function(a,e){if(typeof a.ganttChartView!==c)a.ganttChartView.currentItem=a;if(e.selectionMode=="Focus"||e.selectionMode=="ExtendedFocus"){if(typeof a.scheduleChartItem!==c)a=a.scheduleChartItem;a.isSelected||v(a,true,e.selectionMode)}},E=function(a,e,d,b){var g=
  function(a){return T(a.ganttChartView.ownerDocument,a.content)};return(typeof b===c||b)&&!a.isReadOnly&&!a.isGridReadOnly&&!a.isContentReadOnly?function(b){return!e.isReadOnly&&(typeof b.isReadOnly===c||!b.isReadOnly)?B(b,Math.max(0,e.width-b.indentation*b.ganttChartView.settings.indentationLevelWidth-b.ganttChartView.settings.toggleButtonAreaWidth-16),a):g(b)}:g},B=function(a,e,d){var b=a.ganttChartView.ownerDocument,g;if(typeof a.contentInput===c){g=b.createElement("input");a.contentInput=g;g.type=
  "text";g.addEventListener("focus",function(){z(a,d)},false);var f=function(){a.content=g.value;A(a,"content",true,true);na(a)};typeof g.changeEventListener!==c&&g.removeEventListener("change",g.changeEventListener,true);g.addEventListener("change",f,true);g.changeEventListener=f;b=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();f(a)}};typeof g.keyPressEventListener!==c&&g.removeEventListener("keypress",g.keyPressEventListener,true);g.addEventListener("keypress",b,true);g.keyPressEventListener=
  b;g.addEventListener("focus",function(){g.style.backgroundColor="White"},false);g.addEventListener("blur",function(){g.style.backgroundColor="Transparent"},false)}else g=a.contentInput;g.value=a.content;b="";if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))b="; font-weight: bold";g.setAttribute("style","background-color: Transparent; width: "+e+"px; border-width: 0px; padding: 0px"+b);return g},Sb=function(a,e,d){var b=function(b){return typeof b.start===c||typeof b.isSummaryEnabled!==
  c&&!b.isSummaryEnabled&&typeof b.isBarVisible!==c&&!b.isBarVisible?b.ganttChartView.ownerDocument.createTextNode(""):b.ganttChartView.ownerDocument.createTextNode(a.dateTimeFormatter(x(b.start)))};return(typeof d===c||d)&&!a.isReadOnly&&!a.isGridReadOnly?function(d){return!e.isReadOnly&&(typeof d.isReadOnly===c||!d.isReadOnly)&&!(typeof d.isSummaryEnabled!==c&&!d.isSummaryEnabled&&typeof d.isBarVisible!==c&&!d.isBarVisible)?Kc(d,Math.max(0,e.width-16),a):b(d)}:b},Kc=function(a,e,d){var b=a.ganttChartView.ownerDocument,
  g=b.createElement("input");a.startInput=g;try{g.type=d.dateTimePickerType}catch(f){g.type="text"}g.addEventListener("focus",function(){z(a,d)},false);g.addEventListener("focus",function(){g.style.backgroundColor="White"},false);g.addEventListener("blur",function(){g.style.backgroundColor="Transparent"},false);if(typeof a.start!==c)g.value=d.dateTimeFormatter(x(a.start));DlhSoft.Controls.DatePicker&&(d.dateTimePickerType=="text"&&d.useDatePicker)&&g.addEventListener("focus",function(){if(!a.isWaitingToRefreshGridItem){var e=
  (d.useTimePicker&&DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).get(g);if(!e||!e.isOpen){var c=0,n=0;try{c=g.selectionStart;n=g.selectionEnd}catch(f){}e=(d.useTimePicker&&DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).initialize(g,void 0,{inputStyle:null,isDropDownButtonVisible:false,defaultTimeOfDay:d.workingDayStart,dateTimeFormatter:d.dateTimeFormatter,dateTimeParser:d.dateTimeParser,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid "+
  d.border,disabledDateSelector:Xb(d),disabledTimeSelector:C(d),calendarSelectorLevels:d.calendarSelectorLevels,months:d.months,daysOfWeek:Za(d.daysOfWeek),weekStart:d.weekStartDay},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");e.openDropDown();setTimeout(function(){try{g.selectionStart=c;g.selectionEnd=n}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{g.focus()}catch(a){}},
  100):b.createEvent&&setTimeout(function(){var a=b.createEvent("MouseEvents");a.initEvent("blur",true,false);g.dispatchEvent(a)})}}},true);var h="";if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))h="; font-weight: bold";g.setAttribute("style","background-color: Transparent; width: "+e+"px; border-width: 0px; padding: 0px"+h);a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)?g.setAttribute("disabled","true"):g.removeAttribute("disabled");var n=function(){if(!a.hasChildren||
  !(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){var b=a.completedFinish>a.start,e,n;if(d.isTaskEffortPreservedWhenStartChangesInGrid){e=ga(a,d);n=za(a,d)}var f=a.start.valueOf(),h=a.finish.valueOf(),y=a.completedFinish.valueOf(),p=d.dateTimeParser(g.value);if(p==null||isNaN(p))p=new Date;a.start=P(o(p),d,true,a.isMilestone,D(a));a.preferredStart=a.start;if(a.isMilestone)a.finish=a.start;a.start.valueOf()!=f&&A(a,"start",true,true);if(a.finish<a.start){a.finish=a.start;a.finish.valueOf()!=h&&
  A(a,"finish",false,true)}if(a.completedFinish<a.start||!b){a.completedFinish=a.start;a.completedFinish.valueOf()!=y&&A(a,"completedFinish",false,true)}else if(a.completedFinish>a.finish){a.completedFinish=a.finish;a.completedFinish.valueOf()!=y&&A(a,"completedFinish",false,true)}if(typeof a.completedInput!==c){b=a.completedInput;typeof b.changeEventListener!==c&&b.removeEventListener("change",b.changeEventListener,true);delete a.completedInput}if(d.isTaskEffortPreservedWhenStartChangesInGrid){$a(a,
  e,d);ab(a,n,d)}}Z(a)};typeof g.changeEventListener!==c&&g.removeEventListener("change",g.changeEventListener,true);g.addEventListener("change",n,true);g.changeEventListener=n;e=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();n(a)}};typeof g.keyPressEventListener!==c&&g.removeEventListener("keypress",g.keyPressEventListener,true);g.addEventListener("keypress",e,true);g.keyPressEventListener=e;return g},Tb=function(a,e,d){var b=function(b){return typeof b.finish===c||typeof b.isMilestone!==
  c&&b.isMilestone==true&&typeof b.start!==c&&b.finish.valueOf()==b.start.valueOf()||typeof b.isSummaryEnabled!==c&&!b.isSummaryEnabled&&typeof b.isBarVisible!==c&&!b.isBarVisible?b.ganttChartView.ownerDocument.createTextNode(""):b.ganttChartView.ownerDocument.createTextNode(a.dateTimeFormatter(x(b.finish)))};return(typeof d===c||d)&&!a.isReadOnly&&!a.isGridReadOnly?function(d){return!e.isReadOnly&&(typeof d.isReadOnly===c||!d.isReadOnly)&&!(typeof d.isSummaryEnabled!==c&&!d.isSummaryEnabled&&typeof d.isBarVisible!==
  c&&!d.isBarVisible)?Lc(d,Math.max(0,e.width-16),a):b(d)}:b},Lc=function(a,e,d){var b=a.ganttChartView.ownerDocument,g=b.createElement("input");a.finishInput=g;try{g.type=d.dateTimePickerType}catch(f){g.type="text"}g.addEventListener("focus",function(){z(a,d)},false);g.addEventListener("focus",function(){g.style.backgroundColor="White"},false);g.addEventListener("blur",function(){g.style.backgroundColor="Transparent"},false);if(typeof a.finish!==c)g.value=d.dateTimeFormatter(x(a.finish));DlhSoft.Controls.DatePicker&&
  (d.dateTimePickerType=="text"&&d.useDatePicker)&&g.addEventListener("focus",function(){if(!a.isWaitingToRefreshGridItem){var e=(d.useTimePicker&&DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).get(g);if(!e||!e.isOpen){var c=0,n=0;try{c=g.selectionStart;n=g.selectionEnd}catch(f){}e=(d.useTimePicker&&DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).initialize(g,void 0,{inputStyle:null,isDropDownButtonVisible:false,
  defaultTimeOfDay:d.workingDayFinish,dateTimeFormatter:d.dateTimeFormatter,dateTimeParser:d.dateTimeParser,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid "+d.border,disabledDateSelector:Xb(d),disabledTimeSelector:S(d,a),calendarSelectorLevels:d.calendarSelectorLevels,months:d.months,daysOfWeek:Za(d.daysOfWeek),weekStart:d.weekStartDay},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");
  e.openDropDown();setTimeout(function(){try{g.selectionStart=c;g.selectionEnd=n}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{g.focus()}catch(a){}},100):b.createEvent&&setTimeout(function(){var a=b.createEvent("MouseEvents");a.initEvent("blur",true,false);g.dispatchEvent(a)})}}},true);var h="";typeof a.isMilestone!==c&&a.isMilestone==true&&(h="; visibility: hidden");var n="";if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))n=
  "; font-weight: bold";g.setAttribute("style","background-color: Transparent; width: "+e+"px; border-width: 0px; padding: 0px"+h+n);a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)?g.setAttribute("disabled","true"):g.removeAttribute("disabled");var k=function(){if(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){var b=a.finish.valueOf(),e=a.completedFinish.valueOf(),n=d.dateTimeParser(g.value);if(n==null||isNaN(n))n=new Date;n=o(n);g.value.length>0&&(g.value.indexOf(" ")<
  0&&la(n)==0)&&(n=ba(n));a.finish=P(n,d,a.isMilestone,true,D(a));if(a.finish<a.start)a.finish=a.start;a.finish.valueOf()!=b&&A(a,"finish",true,true);if(a.completedFinish<a.start){a.completedFinish=a.start;a.completedFinish.valueOf()!=e&&A(a,"completedFinish",false,true)}else if(a.completedFinish>a.finish){a.completedFinish=a.finish;a.completedFinish.valueOf()!=e&&A(a,"completedFinish",false,true)}if(typeof a.completedInput!==c){b=a.completedInput;typeof b.changeEventListener!==c&&b.removeEventListener("change",
  b.changeEventListener,true);delete a.completedInput}}Z(a)};typeof g.changeEventListener!==c&&g.removeEventListener("change",g.changeEventListener,true);g.addEventListener("change",k,true);g.changeEventListener=k;e=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();k(a)}};typeof g.keyPressEventListener!==c&&g.removeEventListener("keypress",g.keyPressEventListener,true);g.addEventListener("keypress",e,true);g.keyPressEventListener=e;return g},Xb=function(a){return function(e){if(e.getDay()<
  a.workingWeekStart||e.getDay()>a.workingWeekFinish)return true;e=o(e).valueOf();if(a.specialNonworkingDays)for(var d=0;d<a.specialNonworkingDays.length;d++)if(e==a.specialNonworkingDays[d].valueOf())return true;return false}},C=function(a){return function(e){return e<a.visibleDayStart||e>=a.visibleDayFinish}},S=function(a,e){return function(d){return(Y(e.start)<Y(e.finish)?d<=a.visibleDayStart:d<a.visibleDayStart)||d>a.visibleDayFinish}},Za=function(a){if(a){for(var e=[],d=0;d<a.length;d++){var b=
  a[d],b=b.length>0?b[0].toUpperCase()+(b.length>1?b[1]:""):"";e.push(b)}return e}},G=function(a,e,d){var b=function(a){return typeof a.isMilestone===c||typeof a.isSummaryEnabled!==c&&!a.isSummaryEnabled&&typeof a.isBarVisible!==c&&!a.isBarVisible?a.ganttChartView.ownerDocument.createTextNode(""):ia(a.ganttChartView.ownerDocument,a.isMilestone)};return(typeof d===c||d)&&!a.isReadOnly&&!a.isGridReadOnly?function(d){return!e.isReadOnly&&(typeof d.isReadOnly===c||!d.isReadOnly)&&!(typeof d.isSummaryEnabled!==
  c&&!d.isSummaryEnabled&&typeof d.isBarVisible!==c&&!d.isBarVisible)?Mc(d,a):b(d)}:b},Mc=function(a,e){var d=a.ganttChartView.ownerDocument,b;if(typeof a.milestoneInput===c){b=d.createElement("input");a.milestoneInput=b;b.type="checkbox";b.setAttribute("style","margin: 0px; margin-left: 2px; margin-right: 2px");b.addEventListener("focus",function(){z(a,e)},false)}else b=a.milestoneInput;(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))&&typeof a.isMilestone!==c&&a.isMilestone?
  b.setAttribute("checked",true):b.removeAttribute("checked");if(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){var g=function(){if(b.checked){a.isMilestone=true;A(a,"isMilestone",true,true);if(a.finish>a.start){a.finish=a.start;A(a,"finish",false,true)}if(a.completedFinish>a.start){a.completedFinish=a.start;A(a,"completedFinish",false,true)}}else{a.isMilestone=false;A(a,"isMilestone",true,true)}Z(a)};typeof b.changeEventListener!==c&&b.removeEventListener("change",b.changeEventListener,
  true);b.addEventListener("change",g,true);b.changeEventListener=g;d=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();g(a)}};typeof b.keyPressEventListener!==c&&b.removeEventListener("keypress",b.keyPressEventListener,true);b.addEventListener("keypress",d,true);b.keyPressEventListener=d}else b.setAttribute("style","visibility: hidden");return b},Vb=function(a,e,d){var b=function(a){return typeof a.assignmentsContent===c||typeof a.isSummaryEnabled!==c&&!a.isSummaryEnabled&&typeof a.isBarVisible!==
  c&&!a.isBarVisible?a.ganttChartView.ownerDocument.createTextNode(""):T(a.ganttChartView.ownerDocument,a.assignmentsContent)};return(typeof d===c||d)&&!a.isReadOnly&&!a.isGridReadOnly&&!a.isAssignmentsContentReadOnly?function(d){return!e.isReadOnly&&(typeof d.isReadOnly===c||!d.isReadOnly)&&!(typeof d.isSummaryEnabled!==c&&!d.isSummaryEnabled&&typeof d.isBarVisible!==c&&!d.isBarVisible)?Nc(d,Math.max(0,e.width-16),a):b(d)}:b},Nc=function(a,e,d){var b=a.ganttChartView,g=b.ownerDocument,f;if(typeof a.assignmentsContentInput===
  c){f=g.createElement("input");a.assignmentsContentInput=f;f.type="text";f.addEventListener("focus",function(){z(a,d)},false);var h=function(){a.assignmentsContent=f.value;A(a,"assignmentsContent",true,true);if(!a.hasChildren&&a.hasFixedEffort){a.fixedEffort=ga(a,d);a.fixedEffortAssignments=ha(a)}oa(a);var b=null;DlhSoft.Controls.MultiSelectorComboBox&&(b=DlhSoft.Controls.MultiSelectorComboBox.get(f));if(b!=null&&b.availableChoices.length>0)var e=setInterval(function(){if(!b.isOpen&&g.activeElement!=
  a.assignmentsContentInput){clearInterval(e);Z(a)}},100);else Z(a)};typeof f.changeEventListener!==c&&f.removeEventListener("change",f.changeEventListener,true);f.addEventListener("change",function(a){f.dontAutoFocus=true;h(a)},true);f.changeEventListener=h;var n=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();typeof f.dontAutoFocus!==c&&delete f.dontAutoFocus;h(a)}};typeof f.keyPressEventListener!==c&&f.removeEventListener("keypress",f.keyPressEventListener,true);f.addEventListener("keypress",
  n,true);f.keyPressEventListener=n;f.addEventListener("focus",function(){f.style.backgroundColor="White"},false);f.addEventListener("blur",function(){f.style.backgroundColor="Transparent"},false)}else f=a.assignmentsContentInput;if(typeof a.assignmentsContent!==c)f.value=a.assignmentsContent;DlhSoft.Controls.MultiSelectorComboBox&&d.useResourceSelector&&f.addEventListener("focus",function(){if(!a.isWaitingToRefreshGridItem){var e=DlhSoft.Controls.MultiSelectorComboBox.get(f);if(!e||!e.isOpen&&e.availableChoices.length>
  0){e=d.assignableResources;if(typeof e===c){e=Na(b.items);d.assignableResources=e}var n=0,l=0;try{n=f.selectionStart;l=f.selectionEnd}catch(h){}e=DlhSoft.Controls.MultiSelectorComboBox.initialize(f,e,void 0,{inputStyle:null,autoAppendAvailableChoices:d.autoAppendAssignableResources,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; color: Black; border: 1px solid "+d.border+"; font-size: small; max-height: 188px; overflow-y: auto"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");
  e.openDropDown();setTimeout(function(){try{f.selectionStart=n;f.selectionEnd=l}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{f.focus()}catch(a){}},100):g.createEvent&&setTimeout(function(){var a=g.createEvent("MouseEvents");a.initEvent("blur",true,false);f.dispatchEvent(a)})}}},true);n="";if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))n="; font-weight: bold";f.setAttribute("style","background-color: Transparent; width: "+
  e+"px; border-width: 0px; padding: 0px"+n);return f},Ub=function(a,e,d){var b=function(a){return typeof a.start===c||typeof a.finish===c||a.finish.valueOf()==a.start.valueOf()||typeof a.isSummaryEnabled!==c&&!a.isSummaryEnabled&&typeof a.isBarVisible!==c&&!a.isBarVisible?a.ganttChartView.ownerDocument.createTextNode(""):ia(a.ganttChartView.ownerDocument,a.ganttChartView.isItemCompleted(a))};return(typeof d===c||d)&&!a.isReadOnly&&!a.isGridReadOnly?function(d){return!e.isReadOnly&&(typeof d.isReadOnly===
  c||!d.isReadOnly)&&(!d.hasChildren||!(typeof d.isSummaryEnabled===c||d.isSummaryEnabled))&&!(typeof d.isSummaryEnabled!==c&&!d.isSummaryEnabled&&typeof d.isBarVisible!==c&&!d.isBarVisible)?Oc(d,a):b(d)}:b},Oc=function(a,e){var d=a.ganttChartView.ownerDocument,b;if(typeof a.completedInput===c){b=d.createElement("input");a.completedInput=b;b.type="checkbox";b.setAttribute("style","margin: 0px; margin-left: 2px; margin-right: 2px");b.addEventListener("focus",function(){z(a,e)},false)}else b=a.completedInput;
  a.isSetAsCompleted||(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))&&a.completedFinish>=a.finish&&a.finish>a.start&&(typeof a.isMilestone===c||!a.isMilestone)?b.setAttribute("checked",true):b.removeAttribute("checked");a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)&&b.setAttribute("style","visibility: hidden");var g=function(){if(b.checked){if(a.completedFinish<a.finish){a.completedFinish=a.finish;A(a,"completedFinish",true,true)}if(a.isMilestone||a.finish.valueOf()<=
  a.start.valueOf())a.isSetAsCompleted=true}else{if(a.completedFinish>a.start){a.completedFinish=a.start;A(a,"completedFinish",true,true)}if(a.isMilestone||a.finish.valueOf()<=a.start.valueOf())a.isSetAsCompleted=false}Z(a)};typeof b.changeEventListener!==c&&b.removeEventListener("change",b.changeEventListener,true);b.addEventListener("change",g,true);b.changeEventListener=g;d=function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();g(a)}};typeof b.keyPressEventListener!==c&&b.removeEventListener("keypress",
  b.keyPressEventListener,true);b.addEventListener("keypress",d,true);b.keyPressEventListener=d;return b},kb=function(a){for(var e=0,d=0;d<a.length;d++)e=e+a[d].width;return e},Ec=function(a,e,d){for(var b=J(e.items,d),g=0;g<a.length;g++){var f=a[g];f.ganttChartView=e;if(typeof f.width===c)f.width=100;if(typeof f.minWidth===c)f.minWidth=Math.min(f.width,d.minColumnWidth+(f.isTreeView?b:0));if(typeof f.maxWidth===c)f.maxWidth=d.maxColumnWidth;if(typeof f.cellTemplate===c)f.cellTemplate=function(a){return T(a.ganttChartView.ownerDocument,
  a.content)};if(d.verticalGridLines){if(f.minWidth<4)f.minWidth=4;if(f.width<f.minWidth)f.width=f.minWidth}}},Hc=function(a,e,d,b){var g=a.ownerDocument,f=g.createElement("div");typeof d.columnHeaderClass!==c&&f.setAttribute("class",d.columnHeaderClass);typeof d.columnHeaderStyle!==c&&f.setAttribute("style",d.columnHeaderStyle);for(var h=0;h<e.length;h++)f.appendChild(Oa(g,e[h],d,b));a.appendChild(f)},Oa=function(a,e,d,b){var g=a.createElement("div");g.setAttribute("style","overflow-y: hidden; vertical-align: middle; display: table-cell; -wekbit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; height: "+
  d.headerHeight+"px");var f=a.createElement("div"),h=e.width>=4?2:e.width/2;f.setAttribute("style","padding-left: "+h+"px; padding-right: "+h+"px; overflow-x: hidden; -wekbit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; width: "+e.width+"px");h=a.createElement("div");typeof e.headerClass!==c&&h.setAttribute("class",e.headerClass);typeof e.headerStyle!==c&&h.setAttribute("style",e.headerStyle);h.appendChild(T(a,e.header));f.appendChild(h);g.appendChild(f);if(d.verticalGridLines||
  e.width>=1&&(typeof d.allowUserToResizeColumns===c||d.allowUserToResizeColumns)&&(typeof e.allowUserToResize===c||e.allowUserToResize)){g.isGripperVisible=false;var b=e.ganttChartView,n=function(a){g.isGripperVisible=a;g.style.cursor=a?"e-resize":"default";g.style.borderRight=a?"solid 1px "+d.border:d.verticalGridLines?"solid 1px "+d.verticalGridLines:"";f.style.width=e.width-(g.style.borderRight?1:0)+"px"};d.verticalGridLines&&n();if(e.width>=1&&(typeof d.allowUserToResizeColumns===c||d.allowUserToResizeColumns)&&
  (typeof e.allowUserToResize===c||e.allowUserToResize)){var k=d.splitterWidth;g.addEventListener("mouseover",function(a){if(!DlhSoft.Controls.GanttChartView.isGripperDragging&&!(g.isGripperDragging||typeof a.offsetX===c&&a.currentTarget!=g))n((typeof a.offsetX!==c?a.offsetX:a.layerX-a.currentTarget.offsetLeft)>=e.width-k)},true);g.addEventListener("mousemove",function(a){if(!DlhSoft.Controls.GanttChartView.isGripperDragging&&!(g.isGripperDragging||typeof a.offsetX===c&&a.currentTarget!=g))n((typeof a.offsetX!==
  c?a.offsetX:a.layerX-a.currentTarget.offsetLeft)>=e.width-k)},true);f.addEventListener("mouseover",function(a){!DlhSoft.Controls.GanttChartView.isGripperDragging&&(!g.isGripperDragging&&!(typeof a.offsetX!==c||a.currentTarget!=f))&&n(a.layerX-a.currentTarget.offsetLeft>=e.width-k)},false);f.addEventListener("mousemove",u(b,f,"mousemove",function(a){!DlhSoft.Controls.GanttChartView.isGripperDragging&&(!g.isGripperDragging&&!(typeof a.offsetX!==c||a.currentTarget!=f))&&n(a.layerX-a.currentTarget.offsetLeft>=
  e.width-k)}));g.addEventListener("mousedown",u(b,g,"mousedown",function(a){if(!(a.button!=0||!g.isGripperVisible||DlhSoft.Controls.GanttChartView.isGripperDragging)){DlhSoft.Controls.GanttChartView.isGripperDragging=true;g.isGripperDragging=true;g.initialGripperDraggingX=a.clientX;g.initialColumnWidth=e.width}},true),true);a.addEventListener("mousemove",u(b,a,"mousemove",function(a){if(g.isGripperDragging){e.width=Math.max(e.minWidth,g.initialColumnWidth+(a.clientX-g.initialGripperDraggingX));if(typeof e.maxWidth!==
  c&&e.width>e.maxWidth)e.width=e.maxWidth;f.style.width=e.width-1+"px";typeof d.columnWidthChangeHandler!==c&&setTimeout(function(){d.columnWidthChangeHandler(e,e.width)},0);if(!b.isWaitingToRefreshColumns){b.isWaitingToRefreshColumns=true;setTimeout(function(){var a=kb(d.columns);b.gridHeader.style.width=a+"px";b.gridContent.style.width=a+"px";delete b.isWaitingToRefreshColumns;b.refreshGridItems()},0)}}},true),true);a.addEventListener("mouseup",u(b,a,"mouseup",function(){if(g.isGripperDragging){delete g.isGripperDragging;
  delete g.initialGripperDraggingX;delete g.initialColumnWidth;n(false);delete DlhSoft.Controls.GanttChartView.isGripperDragging}},true),true);g.addEventListener("mouseout",u(b,g,"mouseout",function(){g.isGripperDragging||n(false)}))}}return g},ea=function(a,e){for(var d=-1,b=null,g=null,f=[],h=0;h<a.length;h++){var n=a[h];if(typeof n.scheduleChartItem===c){if(typeof n.isSelected===c)n.isSelected=false;if(n.isSelected){g==null&&(g=n);f.push(n)}if(typeof n.indentation===c)n.indentation=0;if(h==0&&n.indentation!=
  0){n.indentation=0;A(n,"indentation",false,true)}if(typeof n.isExpanded===c)n.isExpanded=true;if(b!=null){var k=b.indentation+1;if(n.indentation>k){n.indentation=k;A(n,"indentation",false,true)}b.hasChildren=n.indentation>b.indentation;if(b.hasChildren&&typeof b.isMilestone!==c&&b.isMilestone){b.isMilestone=false;A(b,"isMilestone",false,true)}}}n.isVisible=d<0||n.indentation<=d;if(typeof n.scheduleChartItem===c){if(n.isVisible&&!n.isExpanded)d=n.indentation;n.isExpanded&&n.indentation==d&&(d=-1);
  b=n}}if(b!=null)b.hasChildren=false;e.selectedItem=g;e.selectedItems=f},Ma=function(a,e,d){d.isTimingInformationInitialized=false;d.isBasicTimingInformationInitialized=false;var b=Y(e.currentTime),g=[],f,h,n;for(h=0;h<a.length;h++){f=a[h];f.index=h;var k=null;for(g.length>0&&(k=g[g.length-1]);k!=null&&f.indentation<=k.indentation;){g.pop();k=g[g.length-1]}f.parent=k;f.children=[];k!=null&&k.children.push(f);if(!f.hasChildren||!(typeof f.isSummaryEnabled===c||f.isSummaryEnabled)){n=f.start;var j=f.finish,
  l=f.completedFinish;if(typeof f.start===c){f.start=b;f.preferredStart=f.start}if(typeof f.finish===c)f.finish=typeof f.isMilestone===c||!f.isMilestone?ba(b):f.start;if(typeof f.isSetAsCompleted===c)f.isSetAsCompleted=typeof f.completedFinish!==c&&f.completedFinish.valueOf()==f.finish.valueOf();if(typeof f.completedFinish===c)f.completedFinish=f.start;if(typeof f.isRelativeToTimezone===c||f.isRelativeToTimezone){f.start=new Date(f.start.valueOf()-f.start.getTimezoneOffset()*6E4);f.preferredStart=f.start;
  f.finish=new Date(f.finish.valueOf()-f.finish.getTimezoneOffset()*6E4);f.completedFinish=typeof f.completedFinish==="number"?Q(f.start,f.completedFinish*N(f.start,f.finish,e,D(f)),e,D(f)):new Date(f.completedFinish.valueOf()-f.completedFinish.getTimezoneOffset()*6E4);if(typeof f.baselineStart!==c)f.baselineStart=new Date(f.baselineStart.valueOf()-f.baselineStart.getTimezoneOffset()*6E4);if(typeof f.baselineFinish!==c)f.baselineFinish=new Date(f.baselineFinish.valueOf()-f.baselineFinish.getTimezoneOffset()*
  6E4);if(typeof f.minStart!==c)f.minStart=new Date(f.minStart.valueOf()-f.minStart.getTimezoneOffset()*6E4);if(typeof f.maxStart!==c)f.maxStart=new Date(f.maxStart.valueOf()-f.maxStart.getTimezoneOffset()*6E4);if(typeof f.minFinish!==c)f.minFinish=new Date(f.minFinish.valueOf()-f.minFinish.getTimezoneOffset()*6E4);if(typeof f.maxFinish!==c)f.maxFinish=new Date(f.maxFinish.valueOf()-f.maxFinish.getTimezoneOffset()*6E4);f.isRelativeToTimezone=false}else if(typeof f.completedFinish==="number")f.completedFinish=
  Q(f.start,f.completedFinish*N(f.start,f.finish,e,D(f)),e,D(f));if(typeof f.minStart!==c&&f.start<f.minStart)f.start=f.minStart;else if(typeof f.maxStart!==c&&f.start>f.maxStart)f.start=f.maxStart;if(typeof f.maxFinish!==c&&f.finish>f.maxFinish)f.finish=f.maxFinish;else if(typeof f.minFinish!==c&&f.finish<f.minFinish)f.finish=f.minFinish;if(f.finish<f.start)f.finish=f.start;if(f.completedFinish<f.start)f.completedFinish=f.start;else if(f.completedFinish>f.finish)f.completedFinish=f.finish;if(typeof f.loadChartItem===
  c)f.start=P(f.start,e,true,typeof f.isMilestone!==c&&f.isMilestone,D(f));typeof f.dependsOf!==c&&delete f.dependsOf;f.preferredStart=f.start;if(typeof f.loadChartItem===c){f.finish=P(f.finish,e,typeof f.isMilestone!==c&&f.isMilestone,true,D(f));f.completedFinish=P(f.completedFinish,e,typeof f.isMilestone!==c&&f.isMilestone,true,D(f))}if(f.finish<f.start)f.finish=f.start;if(typeof f.isMilestone===c)f.isMilestone=!(f.hasChildren&&(typeof f.isSummaryEnabled===c||f.isSummaryEnabled))&&f.finish.valueOf()==
  f.start.valueOf();if(f.completedFinish<f.start)f.completedFinish=f.start;if(f.completedFinish>f.finish)f.completedFinish=f.finish;if(typeof f.isSetAsCompleted!==c&&(!f.isMilestone||f.completedFinish.valueOf()<f.finish.valueOf()))f.isSetAsCompleted=false;(typeof n===c||f.start.valueOf()!=n.valueOf())&&A(f,"start",false,true);(typeof j===c||f.finish.valueOf()!=j.valueOf())&&A(f,"finish",false,true);(typeof l===c||f.completedFinish.valueOf()!=l.valueOf())&&A(f,"completedFinish",false,true)}for(n=0;n<
  g.length;n++){j=g[n];if(typeof j.isSummaryEnabled===c||j.isSummaryEnabled){if(typeof j.start===c||j.start>f.start){j.start=f.start;A(j,"start",false,true)}if(typeof j.finish===c||j.finish<f.finish){j.finish=f.finish;A(j,"finish",false,true)}if(typeof j.completedFinish===c||j.completedFinish.valueOf()!=j.start.valueOf()){j.completedFinish=j.start;A(j,"completedFinish",false,true)}}}(k==null||f.indentation>k.indentation)&&g.push(f)}d.isBasicTimingInformationInitialized=true;for(h=a.length;h-- >0;){f=
  a[h];f.hasChildren&&(typeof f.isSummaryEnabled===c||f.isSummaryEnabled)&&bb(f)}if(e.areTaskDependencyConstraintsEnabled)for(h=0;h<a.length;h++){f=a[h];typeof f.predecessors!==c&&(f.predecessors!=null&&f.predecessors.length>0)&&Aa(f,a,e,d)}else if(e.alwaysHandleInvalidDependencies)for(h=0;h<a.length;h++){f=a[h];typeof f.predecessors!==c&&(f.predecessors!=null&&f.predecessors.length>0)&&Aa(f,a,e,d,true)}for(h=0;h<a.length;h++){f=a[h];if(!f.hasChildren&&f.hasFixedEffort){f.fixedEffort=ga(f,e);f.fixedEffortAssignments=
  ha(f)}}d.isTimingInformationInitialized=true},bb=function(a,e){if(!(a.children.length<=0||typeof a.isSummaryEnabled!==c&&!a.isSummaryEnabled)){typeof e===c&&(e=true);var d=a.start,b=a.finish,g=a.completedFinish;delete a.start;delete a.finish;delete a.completedFinish;for(var f=0;f<=1;f++){for(var h=0;h<a.children.length;h++){var n=a.children[h];if(!(typeof n.isParentSummarizationEnabled!==c&&!n.isParentSummarizationEnabled&&f<1)){if(typeof a.start===c||a.start>n.start)a.start=n.start;if(typeof a.finish===
  c||a.finish<n.finish)a.finish=n.finish}}if(typeof a.start!==c&&typeof a.finish!==c)break}a.completedFinish=a.start;(typeof d===c||a.start.valueOf()!=d.valueOf())&&A(a,"start",false,e);(typeof b===c||a.finish.valueOf()!=b.valueOf())&&A(a,"finish",false,e);(typeof g===c||a.completedFinish.valueOf()!=g.valueOf())&&A(a,"completedFinish",false,e)}},qb=function(a,e){return a==e||pb(a,e)||pb(e,a)},pb=function(a,e){var d=a.parent;return d==null?false:(typeof d.isSummaryEnabled===c||d.isSummaryEnabled)&&d==
  e?true:pb(d,e)},Ba=function(a,e){if(typeof a.predecessors===c)return false;for(var d=0;d<a.predecessors.length;d++)if(a.predecessors[d].item==e)return true;return false},Y=function(a){return new Date(Math.floor(a.valueOf()/864E5)*864E5)},la=function(a){return a.valueOf()-Y(a).valueOf()},ma=function(a){a=Math.floor((a.valueOf()-2592E5)/864E5)%7;a<0&&(a=a+7);return a},xa=function(a,e){Y(a);return new Date(Math.floor((a.valueOf()-2592E5)/6048E5)*6048E5+2592E5+e*864E5)},mb=function(a,e){var d=xa(a,e);
  return Math.abs(d.valueOf()-a.valueOf())<=36E5?d:new Date(d.valueOf()+6048E5)},cb=function(a){return a.hourWidth*(a.visibleDayFinish-a.visibleDayStart)/36E5},I=function(a,e){var d=cb(e),b=cb(e)*(e.visibleWeekFinish-e.visibleWeekStart+1),c=xa(a,e.weekStartDay),c=Math.floor((c-e.timelineStart)/6048E5)*b-Math.max(0,e.weekStartDay-e.visibleWeekStart)*d,b=ma(a),c=b<=e.visibleWeekStart?c+0:b>e.visibleWeekFinish?c+(e.visibleWeekFinish-e.visibleWeekStart+1)*d:c+(b-e.visibleWeekStart)*d,d=la(a);b>=e.visibleWeekStart&&
  b<=e.visibleWeekFinish&&(c=d<=e.visibleDayStart?c+0:d>=e.visibleDayFinish?c+(e.visibleDayFinish-e.visibleDayStart)/36E5*e.hourWidth:c+(d-e.visibleDayStart)/36E5*e.hourWidth);return c},Ia=function(a,e){for(var d=e.timelineStart.valueOf(),b=cb(e),c=cb(e)*(e.visibleWeekFinish-e.visibleWeekStart+1);a>c;){d=d+6048E5;a=a-c}for(d=d+Math.max(0,e.visibleWeekStart-e.weekStartDay)*864E5;a>b;){d=d+864E5;a=a-b}d=d+e.visibleDayStart;d=d+a/e.hourWidth*36E5;return new Date(d)},Jb=function(a){switch(a.theme){default:return[{scaleType:"NonworkingTime",
  isHeaderVisible:false,isHighlightingVisible:true,highlightingStyle:"stroke-width: 0; fill: #f4f4f4; fill-opacity: 0.65"},{scaleType:"Weeks",headerTextFormat:"Date",headerStyle:"padding: 2.25px"},{scaleType:"Days",headerTextFormat:"DayOfWeekAbbreviation",headerStyle:"padding: 2.25px"},{scaleType:"CurrentTime",isHeaderVisible:false,isSeparatorVisible:true,separatorStyle:"stroke: #8bbf8a; stroke-width: 0.5px"}];case "ModernBordered":return[{scaleType:"NonworkingTime",isHeaderVisible:false,isHighlightingVisible:true,
  highlightingStyle:"stroke-width: 0; fill: #f4f4f4; fill-opacity: 0.65"},{scaleType:"Weeks",headerTextFormat:"Date",headerStyle:"padding: 2.25px; border-right: solid 1px White; border-bottom: solid 1px White",isSeparatorVisible:true,separatorStyle:"stroke: #c8bfe7; stroke-width: 0.5px"},{scaleType:"Days",headerTextFormat:"DayOfWeekAbbreviation",headerStyle:"padding: 2.25px; border-right: solid 1px White"},{scaleType:"CurrentTime",isHeaderVisible:false,isSeparatorVisible:true,separatorStyle:"stroke: #8bbf8a; stroke-width: 1px"}];
  case "Aero":return[{scaleType:"NonworkingTime",isHeaderVisible:false,isHighlightingVisible:true,highlightingStyle:"stroke-width: 0; fill: #f4f4f4; fill-opacity: 0.65"},{scaleType:"Weeks",headerTextFormat:"Date",headerStyle:"padding: 2.25px; border-right: solid 1px #c8bfe7; border-bottom: solid 1px #c8bfe7",isSeparatorVisible:true,separatorStyle:"stroke: #c8bfe7; stroke-width: 0.5px"},{scaleType:"Days",headerTextFormat:"DayOfWeekAbbreviation",headerStyle:"padding: 2.25px; border-right: solid 1px #c8bfe7"},
  {scaleType:"CurrentTime",isHeaderVisible:false,isSeparatorVisible:true,separatorStyle:"stroke: Black; stroke-width: 1px"}]}},pa=function(a,e){return new Date(Math.floor((a-2592E5).valueOf()/e.updateScale)*e.updateScale+2592E5)},lb=function(a,e,d,b,g){typeof g===c&&(g=false);var f=a.ownerDocument,h=0,n,k;for(n=0;n<d.length;n++){k=d[n];(typeof k.isHeaderVisible===c||k.isHeaderVisible)&&h++}var j=b.headerHeight;h>0&&(j=b.headerHeight/h);for(n=0;n<d.length;n++){k=d[n];if(!g||!(k.scaleType!="CurrentTime"&&
  k.scaleType!="FutureTime")){h=Pc(k,b);if(typeof h!==c){h.length==0&&h.push({start:b.timelineStart,finish:b.timelineFinish});var l=j;if(typeof k.headerHeight!==c)l=k.headerHeight;for(var w=b.timelineStart,t=0;t<h.length;t++){var y=h[t],p=y.start,r=y.finish;if(k.scaleType!="CurrentTime"&&k.scaleType!="FutureTime"&&k.scaleType!="NonworkingTime"){if(p>w&&(typeof k.isHeaderVisible===c||k.isHeaderVisible))p=w;p<w&&(p=w);if(p<b.timelineStart)p=b.timelineStart;if(r>b.timelineFinish)r=b.timelineFinish;r<p&&
  (r=p);if(t==h.length-1&&r<b.timelineFinish&&(typeof k.isHeaderVisible===c||k.isHeaderVisible))r=b.timelineFinish;w=r}var o=I(p,b),m=I(r,b),v=m-o;if(!(v<=0)){if(typeof k.isHeaderVisible===c||k.isHeaderVisible){var s=Qc(k,y,b),q=f.createElement("div");q.setAttribute("style","float: left; overflow: hidden; width: "+v+"px; height: "+l+"px");var x=f.createElement("div");x.setAttribute("class",k.headerClass);x.setAttribute("style",k.headerStyle);x.appendChild(T(f,s));q.appendChild(x);a.appendChild(q)}y.start=
  p;y.finish=r;y=false;if(typeof k.isHighlightingVisible!==c)y=k.isHighlightingVisible;if(y){y=f.createElementNS("http://www.w3.org/2000/svg","rect");y.setAttribute("x",o-1);y.setAttribute("y",0);y.setAttribute("width",v);y.setAttribute("height",0);y.setAttribute("class",k.highlightingClass);y.setAttribute("style",k.highlightingStyle);y.tag="Scale-Highlighting"+(k.scaleType!="CurrentTime"&&k.scaleType!="FutureTime"?"":"-CurrentTime");e.appendChild(y)}o=false;if(typeof k.isSeparatorVisible!==c)o=k.isSeparatorVisible;
  if(o){o=f.createElementNS("http://www.w3.org/2000/svg","line");o.setAttribute("x1",m-0.75);o.setAttribute("y1",0);o.setAttribute("x2",m-0.75);o.setAttribute("y2",0);o.setAttribute("class",k.separatorClass);o.setAttribute("style",k.separatorStyle);o.tag="Scale-Separator"+(k.scaleType!="CurrentTime"&&k.scaleType!="FutureTime"?"":"-CurrentTime");e.appendChild(o)}}}}}}},Pc=function(a,e){var d="Custom",b,g;if(typeof a.scaleType!==c)d=a.scaleType;switch(d){case "CurrentTime":return[{start:e.timelineStart,
  finish:e.currentTime}];case "FutureTime":return[{start:e.currentTime,finish:e.timelineFinish}];case "Years":d=[];b=new Date(e.timelineStart.valueOf());g=b.getTimezoneOffset();b.setMonth(0,1);var f=b.getTimezoneOffset();for(b=new Date(b.valueOf()-(f-g)*6E4-(f>0?864E5:0));g=Rc(b),b<e.timelineFinish;b=g)d.push({start:b,finish:g});return d;case "Months":d=[];b=new Date(e.timelineStart.valueOf());g=b.getTimezoneOffset();b.setDate(1);f=b.getTimezoneOffset();for(b=new Date(b.valueOf()-(f-g)*6E4-(f>0?864E5:
  0));g=Sc(b),b<e.timelineFinish;b=g)d.push({start:b,finish:g});return d;case "Weeks":d=[];b=e.timelineStart;g=e.weekStartDay;for(f=e.visibleWeekStart;ma(b)!=g;)b=Pa(b);for(;ma(b)<f;)b=ba(b);for(b=new Date(b.valueOf());g=ya(b),b<e.timelineFinish;b=g)d.push({start:b,finish:g});return d;case "Days":d=[];for(b=e.timelineStart;g=ba(b),b<e.timelineFinish;b=g)d.push({start:b,finish:g});return d;case "Hours":d=[];for(b=new Date(Y(e.timelineStart).valueOf()+e.visibleDayStart);g=Tc(new Date(b.valueOf()+36E5),
  e.visibleDayFinish,e.visibleDayStart),b<e.timelineFinish;b=g)d.push({start:b,finish:g});return d;case "NonworkingTime":d=[];b=nb(e.timelineStart,e.workingWeekFinish);for(g=ob(b,e.workingWeekStart);b<e.timelineFinish;b=ya(b),g=ya(g))d.push({start:b,finish:g});if(typeof e.specialNonworkingDays!==c)for(f=0;f<e.specialNonworkingDays.length;f++){b=e.specialNonworkingDays[f];g=ba(b);d.push({start:b,finish:g})}return d;default:return a.intervals}},Tc=function(a,e,d){if(la(a)>e){a=ba(a);return new Date(Y(a).valueOf()+
  d)}return new Date(a.valueOf())},ba=function(a){return new Date(a.valueOf()+864E5)},Pa=function(a){return new Date(a.valueOf()-864E5)},ya=function(a){return new Date(a.valueOf()+6048E5)},Sc=function(a){var e=a.getTimezoneOffset(),a=new Date(a.valueOf()+(e>0?864E5:0)),d=a.getMonth()+1;if(d>=12){d=0;a.setFullYear(a.getFullYear()+1)}a.setMonth(d,1);d=a.getTimezoneOffset();return new Date(a.valueOf()-(d-e)*6E4-(d>0?864E5:0))},Rc=function(a){var e=a.getTimezoneOffset(),a=new Date(a.valueOf()+(e>0?864E5:
  0));a.setFullYear(a.getFullYear()+1);a.setMonth(0,1);var d=a.getTimezoneOffset();return new Date(a.valueOf()-(d-e)*6E4-(d>0?864E5:0))},Yb=function(a,e){if(typeof e===c)return false;for(var d=a.valueOf(),b=0;b<e.length;b++)if(e[b].valueOf()==d)return true;return false},nb=function(a,e){for(;ma(a)!=e;)a=Pa(a);return ba(a)},ob=function(a,e){for(;ma(a)!=e;)a=ba(a);return new Date(a.valueOf())},Qc=function(a,e,d){var b="Date";if(typeof a.headerTextFormat!==c)b=a.headerTextFormat;a=e.start;if(a<d.timelineStart)a=
  d.timelineStart;if(typeof b==="function")return b(a);switch(b){case "Localized":return a.toLocaleString();case "DateTime":return d.dateTimeFormatter(x(a));case "Date":return d.dateFormatter(x(a));case "Hour":a=new Date(a.valueOf()+a.getTimezoneOffset()*6E4);return(a.getHours()<10?"0":"")+a.getHours();case "DayOfWeek":return d.daysOfWeek[ma(a)];case "DayOfWeekAbbreviation":e=d.daysOfWeek[ma(a)];return e.length>0?e[0].toUpperCase():"";case "Day":a=new Date(a.valueOf()+a.getTimezoneOffset()*6E4);return(a.getDate()<
  10?"0":"")+a.getDate();case "Month":return d.months[(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getMonth()];case "MonthAbbreviation":e=d.months[(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getMonth()];return e.length<=0?"":e[0].toUpperCase()+(e.length>1?e.substr(1,Math.min(3,e.length)-1):"");case "Year":return(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getFullYear();case "MonthYear":return d.months[(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getMonth()]+
  " "+(new Date(a.valueOf()+(a.getTimezoneOffset()+720)*6E4)).getFullYear();default:return e.headerText?e.headerText:a.toString()}},Ic=function(a,e,d,b,g,f,h,n){for(var k=0,j=0;j<b.length;j++){var l=b[j];h.isGridVisible&&typeof l.displayRowIndex===c&&a.appendChild(Zb(l,b,g,e,f,h,n));var w=k;typeof l.displayRowIndex!==c&&(w=l.displayRowIndex*h.itemHeight);d.appendChild(rb(l,w,h));l.isVisible&&!(typeof l.isHidden!==c&&l.isHidden)&&(k=Math.max(k,w+h.itemHeight));l.itemTop=w}ua(e,k);setTimeout(function(){Qa(b,
  e,h)},0)},va=function(a,e){for(var d=0,b=0,g=-1,f=0;f<a.length;f++){var h=a[f];if((typeof h.scheduleChartItem===c||h.scheduleChartItem==h)&&h.isVisible&&!(typeof h.isHidden!==c&&h.isHidden))if(typeof h.displayRowIndex===c&&b>g){d=d+e.itemHeight;g=b++}else{d=Math.max(d,h.itemTop+e.itemHeight);g=h.displayRowIndex}}return d},Ca=function(a,e,d){if(a.isPart)return Ca(a.ganttChartItem,e,d);var b;if(typeof a.displayRowIndex!==c){b=a.displayRowIndex*d.itemHeight;return a.itemTop=b}for(var g=b=0;g<e.length;g++){var f=
  e[g];if(f==a)break;f.isVisible&&(!(typeof f.isHidden!==c&&f.isHidden)&&typeof f.displayRowIndex===c)&&(b=b+d.itemHeight)}return a.itemTop=b},Qa=function(a,e,d){if(!(typeof d.alternativeItemClass===c&&typeof d.alternativeItemStyle===c&&typeof d.alternativeChartItemClass===c&&typeof d.alternativeChartItemStyle===c)){var b=e.chartAreaAlternativeRows,g,f=0,h=false;b.count=f;for(g=0;g<a.length;g++){var n=a[g];if(n.isVisible&&typeof n.alternativeContentContainer!==c){var k=n.alternativeContentContainer;
  if(f%2==1){typeof d.alternativeItemClass!==c&&k.setAttribute("class",d.alternativeItemClass);typeof d.alternativeItemStyle!==c&&k.setAttribute("style",d.alternativeItemStyle);if(typeof d.alternativeChartItemClass!==c||typeof d.alternativeChartItemStyle!==c)if(!d.isVirtualizing||n.isVirtuallyVisible||!h){h=true;if(typeof b.count===c||f>b.count){n=document.createElementNS("http://www.w3.org/2000/svg","rect");n.setAttribute("x",0);n.setAttribute("y",f*d.itemHeight);n.setAttribute("width",e.clientWidth);
  n.setAttribute("height",d.itemHeight);typeof d.alternativeChartItemClass!==c&&n.setAttribute("class",d.alternativeChartItemClass);typeof d.alternativeChartItemStyle!==c&&n.setAttribute("style",d.alternativeChartItemStyle);n.index=f;b.appendChild(n)}}b.count=f}else{k.setAttribute("class","");k.setAttribute("style","")}f++}}for(g=b.childNodes.length;g-- >0;){a=b.childNodes[g];a.index>b.count&&b.removeChild(a)}}},Zb=function(a,e,d,b,g,f,h){var n=a.ganttChartView.ownerDocument,k=n.createElement("div");
  typeof f.itemClass!==c&&k.setAttribute("class",f.itemClass);typeof f.itemStyle!==c&&k.setAttribute("style",f.itemStyle);var j=n.createElement("div");a.alternativeContentContainer=j;var l=n.createElement("div");try{l.addEventListener("mousedown",u(h,l,"mousedown",function(b){b.target!=a.selectionInput&&z(a,f)}));l.addEventListener("mouseup",u(h,l,"mouseup",function(b){b.target!=a.selectionInput&&z(a,f)}))}catch(w){}if(a.isSelected){typeof f.selectedItemClass!==c&&l.setAttribute("class",f.selectedItemClass);
  typeof f.selectedItemStyle!==c&&l.setAttribute("style",f.selectedItemStyle)}var t=n.createElement("div");typeof a["class"]!==c&&t.setAttribute("class",a["class"]);typeof a.style!==c&&t.setAttribute("style",a.style);var y=n.createElement("div");if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){typeof f.summaryItemClass!==c&&y.setAttribute("class",f.summaryItemClass);typeof f.summaryItemStyle!==c&&y.setAttribute("style",f.summaryItemStyle)}else if(a.isMilestone){typeof f.milestoneItemClass!==
  c&&y.setAttribute("class",f.milestoneItemClass);typeof f.milestoneItemStyle!==c&&y.setAttribute("style",f.milestoneItemStyle)}else{typeof f.standardItemClass!==c&&y.setAttribute("class",f.standardItemClass);typeof f.standardItemStyle!==c&&y.setAttribute("style",f.standardItemStyle)}n=n.createElement("div");a.gridItem=n;a.gridItemContent=y;a.gridItemSelectionContainer=l;var p=f.itemHeight;if(!a.isVisible||typeof a.isHidden!==c&&a.isHidden)p=0;n.setAttribute("style","overflow: hidden; height: "+p+"px");
  Da(n,a,e,d,b,g,f);y.appendChild(n);t.appendChild(y);l.appendChild(t);j.appendChild(l);k.appendChild(j);a.gridItemContainer=k;(typeof f.isGridRowClickTimeScrollingEnabled===c||f.isGridRowClickTimeScrollingEnabled)&&k.addEventListener("mouseup",u(h,k,"mouseup",function(){var d;if(typeof a.ganttChartItems===c)d=a.start;else{d=null;for(var e=0;e<a.ganttChartItems.length;e++)if(d==null||a.ganttChartItems[e].start<d)d=a.ganttChartItems[e].start;d=d==null?a.start:d}d=I(d,f);e=d-f.hourWidth*8;d-e>=b.container.clientWidth/
  2.5&&(e=d);b.container.scrollLeft=Math.max(0,e)},true),true);return k},Da=function(a,e,d,b,g,f,h){var n=e.ganttChartView.ownerDocument;if(!h.isVirtualizing||typeof e.isVirtuallyVisible!==c&&e.isVirtuallyVisible){var k=function(){if(typeof e.gridItemSelectionContainer!==c){var k=e.gridItemSelectionContainer;typeof h.selectedItemClass!==c&&k.setAttribute("class",e.isSelected?h.selectedItemClass:null);typeof h.selectedItemStyle!==c&&k.setAttribute("style",e.isSelected?h.selectedItemStyle:null)}if(typeof e.gridItemContent!==
  c){k=e.gridItemContent;k.setAttribute("class","");k.setAttribute("style","");if(e.hasChildren&&(typeof e.isSummaryEnabled===c||e.isSummaryEnabled)){typeof h.summaryItemClass!==c&&k.setAttribute("class",h.summaryItemClass);typeof h.summaryItemStyle!==c&&k.setAttribute("style",h.summaryItemStyle)}else if(e.isMilestone){typeof h.milestoneItemClass!==c&&k.setAttribute("class",h.milestoneItemClass);typeof h.milestoneItemStyle!==c&&k.setAttribute("style",h.milestoneItemStyle)}else{typeof h.standardItemClass!==
  c&&k.setAttribute("class",h.standardItemClass);typeof h.standardItemStyle!==c&&k.setAttribute("style",h.standardItemStyle)}}var k=[],l=null;try{l=n.activeElement}catch(w){}for(;l!=null&&l!=e.gridItem;){k.push(l);l=l.parentNode}for(var t=-1,l=a.childNodes.length;l-- >0;)if(k.indexOf(a.childNodes[l])>=0){t=l;break}for(l=a.childNodes.length;l-- >0;)a.removeChild(a.childNodes[l]);for(l=0;l<b.length;l++)a.appendChild($b(e,d,b[l],g,f,h));typeof e.ganttChartView.draggingItem===c&&t>=0&&setTimeout(function(){try{for(var b=
  a.childNodes[t];b.nodeName!="input"&&b.nodeName!="textarea"&&b.nodeName!="label"&&b.nodeName!="select"&&b.nodeName!="button"&&b.childNodes.length>0;)b=b.childNodes[0];b&&b.dontAutoFocus?delete b.dontAutoFocus:setTimeout(function(){try{b.focus()}catch(a){}},0)}catch(d){}},0)};if(e.wasGridItemContentLoaded)setTimeout(k,0);else{k();e.wasGridItemContentLoaded=true}}},Ra=function(a){if(typeof a.isWaitingToRefreshGridItem===c){a.isWaitingToRefreshGridItem=true;setTimeout(function(){typeof a.gridItem!==
  c&&Da(a.gridItem,a,a.ganttChartView.items,a.ganttChartView.settings.columns,a.ganttChartView.chartContent,a.ganttChartView.settings.toggleButtonAreaWidth,a.ganttChartView.settings);delete a.isWaitingToRefreshGridItem},0)}},Uc=function(a,e,d,b,g,f,h){var n=e.ganttChartView.ownerDocument;(!h.isVirtualizing||typeof e.isVirtuallyVisible!==c&&e.isVirtuallyVisible)&&setTimeout(function(){if(typeof e.gridItemSelectionContainer!==c){var k=e.gridItemSelectionContainer;typeof h.selectedItemClass!==c&&k.setAttribute("class",
  e.isSelected?h.selectedItemClass:null);typeof h.selectedItemStyle!==c&&k.setAttribute("style",e.isSelected?h.selectedItemStyle:null)}var k=[],j=null;try{j=n.activeElement}catch(l){}for(;j!=null&&j!=e.gridItem;){k.push(j);j=j.parentNode}for(var w=-1,j=a.childNodes.length;j-- >0;)if(a.childNodes[j].isSelection&&k.indexOf(a.childNodes[j])>=0){w=j;break}for(j=a.childNodes.length;j-- >0;)a.childNodes[j].isSelection&&a.removeChild(a.childNodes[j]);for(j=0;j<b.length;j++)b[j].isSelection&&j<a.childNodes.length&&
  a.insertBefore($b(e,d,b[j],g,f,h),a.childNodes[j]);typeof e.ganttChartView.draggingItem===c&&w>=0&&setTimeout(function(){try{for(var b=a.childNodes[w];b.nodeName!="input"&&b.nodeName!="textarea"&&b.nodeName!="label"&&b.nodeName!="select"&&b.nodeName!="button"&&b.childNodes.length>0;)b=b.childNodes[0];b&&b.dontAutoFocus?delete b.dontAutoFocus:setTimeout(function(){try{b.focus()}catch(a){}},0)}catch(d){}},0)},0)},Wb=function(a){typeof a.gridItem!==c&&Uc(a.gridItem,a,a.ganttChartView.items,a.ganttChartView.settings.columns,
  a.ganttChartView.chartContent,a.ganttChartView.settings.toggleButtonAreaWidth,a.ganttChartView.settings)},$b=function(a,e,d,b,g,f){var h=a.ganttChartView.ownerDocument,n=h.createElement("div"),k=0;d.isTreeView==true&&(k=f.indentationLevelWidth*a.indentation);n.setAttribute("style","overflow: hidden; vertical-align: middle; display: table-cell; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; margin: 0px; padding: 0px; width: "+d.width+"px; height: "+f.itemHeight+
  "px; padding-left: "+k+"px");var j=h.createElement("div");typeof d.cellClass!==c?j.setAttribute("class",d.cellClass):typeof f.cellClass!==c&&j.setAttribute("class",f.cellClass);typeof d.cellStyle!==c?j.setAttribute("style",d.cellStyle):typeof f.cellStyle!==c&&j.setAttribute("style",f.cellStyle);var l=h.createElement("div");l.setAttribute("style","white-space: nowrap; overflow: hidden; margin: 0px; padding: 0px; width: "+(d.width-k-16)+"px");if(d.isTreeView==true){k=h.createElement("div");k.setAttribute("style",
  "display: inline-block; width: "+g+"px");if(a.hasChildren){g=h.createElement("div");g.setAttribute("style","cursor: default; padding-left: 1px; font-size: 12px; display: inline-block");h=f.collapsedToggleButtonTemplate;if(a.isExpanded)h=f.expandedToggleButtonTemplate;h=h();g.appendChild(h);ac(g,a,e,h,b,null,null,f);k.appendChild(g)}l.appendChild(k)}a=d.cellTemplate(a);l.appendChild(a);j.appendChild(l);n.appendChild(j);n.isSelection=d.isSelection;return n},Hb=function(a,e){return function(){var d=
  a.ownerDocument.createElementNS("http://www.w3.org/2000/svg","polygon");d.setAttribute("points","3.5,2.5 3.5,11.5 10.5,6.5");return m(d,e)}},Ib=function(a,e){return function(){var d=a.ownerDocument.createElementNS("http://www.w3.org/2000/svg","polygon");d.setAttribute("points","2.5,3.5 11.5,3.5 6.5,10.5");return m(d,e)}},ac=function(a,e,d,b,g,f,h,n){if(typeof f===c||f==null)f=b.querySelector("#PART_Button");f!=null&&bc(f,f,n,e.ganttChartView);if(typeof h===c||h==null)h=b.querySelector("#PART_Border");
  h!=null&&bc(h,f,n,e.ganttChartView);d={toggleButton:a,item:e,items:d,content:b,chartContent:g,settings:n};if(f!=null){f.tag=d;(typeof n.isExport===c||!n.isExport)&&f.addEventListener("mouseup",u(e.ganttChartView,f,"mouseup",sb,true),true)}if(h!=null){h.tag=d;(typeof n.isExport===c||!n.isExport)&&h.addEventListener("mouseup",u(e.ganttChartView,h,"mouseup",sb,true),true)}a.tag=d;f==null&&(h==null&&(typeof n.isExport===c||!n.isExport))&&a.addEventListener("mouseup",u(e.ganttChartView,a,"mouseup",sb,
  true),true);b.addEventListener("keypress",u(e.ganttChartView,b,"keypress",function(a){if(a.keyCode==32){a.preventDefault();a.stopPropagation();ja(e,!e.isExpanded,true)}},true),true);e.toggleButton=a},bc=function(a,e,d,b){if(!(typeof d.isExport!==c&&d.isExport)){a.addEventListener("mouseover",u(b,a,"mouseover",function(){typeof d.toggleButtonHoveringClass!==c&&e.setAttribute("class",d.toggleButtonHoveringClass);typeof d.toggleButtonHoveringStyle!==c&&e.setAttribute("style",d.toggleButtonHoveringStyle)},
  true),true);a.addEventListener("mouseout",u(b,a,"mouseout",function(){e.setAttribute("class",d.toggleButtonClass);e.setAttribute("style",d.toggleButtonStyle)},true),true)}},sb=function(a){a.stopPropagation();a=a.target.tag.item;ja(a,!a.isExpanded,true)},ja=function(a,e,d,b){if(a.isExpanded!=e){a.isExpanded=e;(typeof b===c||b)&&A(a,"isExpanded",d,true);cc(a)}},cc=function(a,e){if(typeof a.toggleButton===c)(typeof e===c||e)&&setTimeout(function(){cc(a,false)},0);else{var d=a.toggleButton,b=d.tag,g=
  b.settings,f=g.expandedToggleButtonTemplate,h=g.collapsedToggleButtonTemplate;a.isExpanded&&(h=f);var f=h(),h=f.querySelector("#PART_Button"),n=f.querySelector("#PART_Border");d.replaceChild(f,b.content);b.content=f;var k=b.items,b=b.chartContent;ac(d,a,k,f,b,h,n,g);a.isVisible&&!(typeof a.isHidden!==c&&a.isHidden)&&Vc(k,a,b,g);oa(a);Qa(k,b,g);d=a.scheduleChartView;if(typeof d!==c)for(g=a.scheduleChartIndex;g<d.scheduleChartItems.length;g++){b=d.scheduleChartItems[g];if(typeof b.ganttChartItems!==
  c)for(f=0;f<b.ganttChartItems.length;f++){h=b.ganttChartItems[f];h.displayRowIndex=b.itemTop/d.settings.itemHeight;d.refreshChartItem(h)}}}},Vc=function(a,e,d,b){var g=-1,f=false,h=false,n=false,k=0,j,l,w,t=[];for(l=0;l<a.length;l++){w=a[l];if(w==e){f=w.isExpanded;g=w.indentation}else w.indentation<=g&&(n=true);var y=w.chartItem;if(h&&!n){if(w.scheduleChartItem&&w.scheduleChartItem!=w)j=w.scheduleChartItem.isVisible;else if(f){j=true;for(var p=w.parent;p!=null;){if(!p.isVisible||!p.isExpanded){j=
  false;break}p=p.parent}}else j=false;if(w.isVisible!=j){w.isVisible=f;A(w,"isVisible",false,true);j=b.itemHeight;if(!w.isVisible||typeof w.isHidden!==c&&w.isHidden)j=0;if(typeof w.gridItem!==c)w.gridItem.style.height=j+"px";j="visible";if(!w.isVisible||typeof w.isHidden!==c&&w.isHidden)j="hidden";y.setAttribute("style","visibility: "+j)}}if(typeof w.displayRowIndex===c){y.setAttribute("transform","translate(0, "+k+")");Ea(w,k)}w==e&&(h=true);j=b.itemHeight;if(!w.isVisible||typeof w.isHidden!==c&&
  w.isHidden)j=0;if(w.itemTop!=k)w.itemTop=k;typeof w.displayRowIndex===c&&(k=k+j);if(w.predecessors&&w.predecessors.length>0&&t.indexOf(w)<0){t.push(w);for(y=0;y<w.predecessors.length;y++){j=w.predecessors[y].item;t.indexOf(j)<0&&t.push(j)}}}ua(d,k);qa(a,e);if(b.areTaskDependenciesVisible)for(l=0;l<t.length;l++)qa(a,t[l]);wa(a,d.container,b)},Ea=function(a,e){typeof a.parts===c||a.parts.length<=0||setTimeout(function(){for(var d=0;d<a.parts.length;d++){var b=a.parts[d];b.itemTop=e;if(typeof b.chartItem!==
  c){b.chartItem.setAttribute("transform","translate(0, "+e+")");b.chartItem.style.visibility=a.chartItem.style.visibility;if(typeof b.isInternallyHidden!==c){delete b.isInternallyHidden;b.chartItem.style.display="inline"}}}},0)},ua=function(a,e){if(e<a.availableHeight)e=a.availableHeight;a.style.height=e+"px";var d=a.chartArea;d.style.height=e+"px";for(var b=0;b<d.childNodes.length;b++){var g=d.childNodes[b];if(typeof g.tag!==c)switch(g.tag){case "Scale-Highlighting":case "Scale-Highlighting-CurrentTime":g.setAttribute("height",
  e);break;case "Scale-Separator":case "Scale-Separator-CurrentTime":g.setAttribute("y2",e)}}},qa=function(a,e){var d=[],b,g,f,h;if(typeof e.successors===c){e.successors=[];for(g=0;g<a.length;g++){b=a[g];if(!(b==e||typeof b.predecessors===c||b.predecessors.length==0))for(f=0;f<b.predecessors.length;f++)if(b.predecessors[f].item==e){e.successors.push(b);break}}}for(g=0;g<e.successors.length;g++){var n=e.successors[g];if(typeof n.predecessors!==c&&n.predecessors.length>0)for(f=0;f<n.predecessors.length;f++){var k=
  n.predecessors[f].item;if(typeof k!==c){b=true;for(h=0;h<d;h++)if(k==d[h]){b=false;break}if(b){fa(k.chartItem,k,k.ganttChartView.settings);d.push(k)}}}if(typeof n.predecessors!==c&&n.predecessors.length>0){b=true;for(h=0;h<d;h++)if(typeof n!==c&&n==d[h]){b=false;break}if(b){fa(n.chartItem,n,n.ganttChartView.settings);d.push(n)}}}},rb=function(a,e,d){var b=a.ganttChartView.ownerDocument.createElementNS("http://www.w3.org/2000/svg","g");a.chartItem=b;var g="visible";if(!a.isVisible||typeof a.isHidden!==
  c&&a.isHidden)g="hidden";b.setAttribute("style","visibility: "+g+"; -ms-touch-action: pinch-zoom; touch-action: pinch-zoom");b.setAttribute("transform","translate(0, "+e+")");if(typeof a.isInternallyHidden!==c&&a.isInternallyHidden)b.style.display="none";Ea(a,e);fa(b,a,d);try{b.addEventListener("mousedown",u(a.ganttChartView,b,"mousedown",function(){z(a,d)}));b.addEventListener("mouseup",u(a.ganttChartView,b,"mouseup",function(){z(a,d)}))}catch(f){}return b},fa=function(a,e,d){for(var b=a.childNodes.length;b-- >
  0;)a.removeChild(a.childNodes[b]);if(!(d.isVirtualizing&&(typeof e.isVirtuallyVisible===c||!e.isVirtuallyVisible)||typeof e.isBarVisible!==c&&!e.isBarVisible)){b=d.standardTaskTemplate;if(typeof e.standardTaskTemplate!==c)b=e.standardTaskTemplate;if(e.hasChildren&&(typeof e.isSummaryEnabled===c||e.isSummaryEnabled)){b=d.summaryTaskTemplate;if(typeof e.summaryTaskTemplate!==c)b=e.summaryTaskTemplate}else if(e.isMilestone){b=d.milestoneTaskTemplate;if(typeof e.milestoneTaskTemplate!==c)b=e.milestoneTaskTemplate}if(typeof e.taskTemplate!==
  c)b=e.taskTemplate;if(typeof d.internalPreTaskTemplate!==c){var g=d.internalPreTaskTemplate(e);g!=null&&a.appendChild(g)}b=b(e);b.addEventListener("contextmenu",u(e.ganttChartView,b,"contextmenu",function(a){typeof d.itemContextMenuHandler!==c?d.itemContextMenuHandler(a,e):a.preventDefault()}));a.appendChild(b);if(typeof d.internalExtraTaskTemplate!==c){g=d.internalExtraTaskTemplate(e);g!=null&&a.appendChild(g)}if(typeof d.extraTaskTemplate!==c){g=d.extraTaskTemplate(e);g!=null&&a.appendChild(g)}if(d.areTaskAssignmentsVisible){g=
  d.assignmentsTemplate(e);b.appendChild(g)}if(d.isTaskToolTipVisible){g=d.itemTemplate;if(typeof e.template!==c)g=e.template;b.appendChild(g(e))}if(d.areTaskDependenciesVisible&&typeof e.predecessors!==c)for(b=0;b<e.predecessors.length;b++){g=e.predecessors[b];if(!((typeof e.ganttChartView===c||e.ganttChartView.items.indexOf(g.item))<0||!g.item.isVisible||typeof g.item.isHidden!==c&&g.item.isHidden||typeof g.item.isBarVisible!==c&&!g.item.isBarVisible)){var f=d.dependencyLineTemplate(e,g);f.predecessorIndex=
  b;(function(){f.addEventListener("click",u(e.ganttChartView,f,"click",function(a){d.dependencyLineClickHandler&&d.dependencyLineClickHandler(e.predecessors[this.predecessorIndex],e,a)}));f.addEventListener("dblclick",u(e.ganttChartView,f,"dblclick",function(a){d.dependencyLineDoubleClickHandler&&d.dependencyLineDoubleClickHandler(e.predecessors[this.predecessorIndex],e,a)}))})(g);typeof d.predecessorItemContextMenuHandler!==c?f.addEventListener("contextmenu",u(e.ganttChartView,f,"contextmenu",function(a){d.predecessorItemContextMenuHandler(a,
  e.predecessors[this.predecessorIndex],e)})):!d.isReadOnly&&(!d.isChartReadOnly&&!d.areTaskPredecessorsReadOnly&&(typeof e.isReadOnly===c||!e.isReadOnly))&&f.addEventListener("contextmenu",u(e.ganttChartView,f,"contextmenu",function(a){if(confirm("Are you sure you want to remove the predecessor?")){for(var b=[],c=0;c<e.predecessors.length;c++)if(c!=this.predecessorIndex){var f=e.predecessors[c];delete f.item.successors;b.push(f)}e.predecessors=b;A(e,"predecessors",true,true);fa(e.chartItem,e,d);qa(e.ganttChartView.items,
  e)}a.preventDefault()}));a.appendChild(f);if(d.isDependencyToolTipVisible){var h=d.predecessorItemTemplate;if(typeof g.template!==c)h=g.template;f.appendChild(h(e,g))}}}}},Sa=function(a){for(var e=0;e<a.length;e++)Ja(a[e])},oa=function(a){if((!a.ganttChartView.settings.isVirtualizing||typeof a.isVirtuallyVisible!==c&&a.isVirtuallyVisible)&&typeof a.isWaitingToRefreshChartItem===c){a.isWaitingToRefreshChartItem=true;setTimeout(function(){fa(a.chartItem,a,a.ganttChartView.settings);var e=Ca(a,a.ganttChartView.items,
  a.ganttChartView.settings);a.chartItem.setAttribute("transform","translate(0, "+e+")");Ea(a,e);delete a.isWaitingToRefreshChartItem},0)}},na=function(a){if(!a.ganttChartView.settings.isVirtualizing||typeof a.isVirtuallyVisible!==c&&a.isVirtuallyVisible)if(typeof a.isWaitingToRefreshGridItem!==c||typeof a.isWaitingToRefreshChartItem!==c){typeof a.isWaitingToRefreshGridItem===c&&Ra(a);typeof a.isWaitingToRefreshChartItem===c&&oa(a)}else{a.isWaitingToRefreshGridItem=true;a.isWaitingToRefreshChartItem=
  true;setTimeout(function(){typeof a.gridItem!==c&&Da(a.gridItem,a,a.ganttChartView.items,a.ganttChartView.settings.columns,a.ganttChartView.chartContent,a.ganttChartView.settings.toggleButtonAreaWidth,a.ganttChartView.settings);fa(a.chartItem,a,a.ganttChartView.settings);var e=Ca(a,a.ganttChartView.items,a.ganttChartView.settings);a.chartItem.setAttribute("transform","translate(0, "+e+")");Ea(a,e);delete a.isWaitingToRefreshGridItem;delete a.isWaitingToRefreshChartItem},0)}},ra=function(a){if((!a.ganttChartView.settings.isVirtualizing||
  typeof a.isVirtuallyVisible!==c&&a.isVirtuallyVisible)&&typeof a.isWaitingToRefreshPredecessorItems===c){a.isWaitingToRefreshPredecessorItems=true;setTimeout(function(){qa(a.ganttChartView.items,a);delete a.isWaitingToRefreshPredecessorItems},0)}},Ja=function(a){if(!a.ganttChartView.settings.isVirtualizing||typeof a.isVirtuallyVisible!==c&&a.isVirtuallyVisible)if(typeof a.isWaitingToRefreshGridItem!==c||typeof a.isWaitingToRefreshChartItem!==c||typeof a.isWaitingToRefreshPredecessorItems!==c){typeof a.isWaitingToRefreshGridItem===
  c&&Ra(a);typeof a.isWaitingToRefreshChartItem===c&&oa(a);typeof a.isWaitingToRefreshPredecessorItems===c&&ra(a)}else{a.isWaitingToRefreshGridItem=true;a.isWaitingToRefreshChartItem=true;a.isWaitingToRefreshPredecessorItems=true;setTimeout(function(){typeof a.gridItem!==c&&Da(a.gridItem,a,a.ganttChartView.items,a.ganttChartView.settings.columns,a.ganttChartView.chartContent,a.ganttChartView.settings.toggleButtonAreaWidth,a.ganttChartView.settings);fa(a.chartItem,a,a.ganttChartView.settings);var e=
  Ca(a,a.ganttChartView.items,a.ganttChartView.settings);a.chartItem.setAttribute("transform","translate(0, "+e+")");Ea(a,e);qa(a.ganttChartView.items,a);delete a.isWaitingToRefreshGridItem;delete a.isWaitingToRefreshChartItem;delete a.isWaitingToRefreshPredecessorItems},0)}},Z=function(a){Ja(a);for(a=a.parent;a!=null;){bb(a);Ja(a);a=a.parent}},Ta=function(a,e,d,b){H(e,b);ea(e,d);Ma(e,b,d);d=a.index-1;d>=0&&Z(e[d]);Z(a);d=a.index+1;d<e.length&&Z(e[d])},db=function(a,e){var d=e.toggleButtonAreaWidth;
  delete e.toggleButtonAreaWidth;J(a,e);return e.toggleButtonAreaWidth!=d},dc=function(a,e,d,b,g){d.initializedItems.push(e);e.ganttChartView=d;for(e.isVirtuallyVisible=true;a>0&&b[a-1].isPart;)a--;for(var f=0;f<b.length;f++)if(b[f].parts&&b[f].parts.indexOf(e)>=0){e.isPart=true;e.ganttChartItem=b[f];break}var h=a<b.length?b[a]:null;if(h==null||h.isPart){h=a>0?b[a-1]:null;h=h!=null?h.indentation+1:0;if(e.indentation>h)e.indentation=h}else if(typeof e.indentation===c||e.indentation<h.indentation-1||
  e.indentation>h.indentation)e.indentation=h.indentation;H([e],g);b.splice(a,0,e);ea(b,d);if(typeof e.parts!==c){if(typeof e.isGroup===c){e.isGroup=true;e.isSummaryEnabled=false}H(e.parts,g);if(e.isGroup||typeof e.isBarVisible===c)e.isBarVisible=false;for(f=0;f<e.parts.length;f++){var n=e.parts[f];n.ganttChartView=e.ganttChartView;n.ganttChartItem=e;n.isPart=true;n.isVirtuallyVisible=true;if(e.isGroup||typeof n.indentation===c)n.indentation=0;if(e.isGroup||typeof n.displayRowIndex===c)n.displayRowIndex=
  -1;n.isInternallyHidden=true;b.indexOf(n)>=0||b.splice(b.length,0,n)}}Ma(b,g,d);var k;if(g.isGridVisible&&!e.isPart&&typeof e.displayRowIndex===c){f=null;if(a<b.length-1){h=b[a+1];if(!h.isPart){k=h.itemTop;if(typeof h.gridItemContainer!==c)f=h.gridItemContainer}}d.gridContent.insertBefore(Zb(e,b,g.columns,d.chartContent,g.toggleButtonAreaWidth,g,d),f)}typeof k===c&&(k=va(b,g)-g.itemHeight);h=k;typeof e.displayRowIndex!==c&&(h=e.displayRowIndex*g.itemHeight);var j=d.chartContent.chartArea;j.appendChild(rb(e,
  h,g));e.isVisible&&!(typeof e.isHidden!==c&&e.isHidden)&&(k=Math.max(k,h+g.itemHeight));e.itemTop=h;if(typeof e.parts!==c)for(f=0;f<e.parts.length;f++){n=e.parts[f];j.appendChild(rb(n,h,g))}if(typeof e.displayRowIndex===c)for(f=a+1;f<b.length;f++){n=b[f];h=k;typeof n.displayRowIndex!==c&&(h=n.displayRowIndex*g.itemHeight);n.isVisible&&!(typeof n.isHidden!==c&&n.isHidden)&&(k=Math.max(k,h+g.itemHeight));n.itemTop=h;oa(n);qa(b,n)}for(f=a+1;f<b.length;f++)Ra(b[f]);if(d.isContentHeightInitialized&&d.isContentHeightAuto){a=
  K(d,b,g);d.gridContentContainer.style.height=a;d.chartContentContainer.style.height=a}ua(d.chartContent,va(b,g));Qa(b,d.chartContent,g);db(b,g)&&Sa(b);Ta(e,b,d,g);wa(b,d.chartContentContainer,g)},ec=function(a,e,d,b){if(typeof a.parts!==c)for(var g=0;g<a.parts.length;g++)ec(a.parts[g],e,d,b);var g=a.index,f=null,h=false;if(g>0){for(f=d[g-1];f.parent!=null;)f=f.parent;h=f.isExpanded;a.hasChildren&&ja(f,a.isExpanded,false,true);f.indentation>=a.indentation&&(f=null)}else d[0].isExpanded||ja(d[0],true,
  false,true);var n=g+1<d.length?d[g+1]:null;n!=null&&(!n.isExpanded&&n.indentation>a.indentation)&&ja(n,true,false,true);var k=n!=null?n.indentation:null,j,l,w;for(l=0;l<e.items.length;l++){j=e.items[l];if(j.predecessors!=null)for(w=j.predecessors.length;w-- >0;)if(j.predecessors[w].item==a){j.predecessors.splice(w,1);A(j,"predecessors",false,true);na(j);ra(j)}}var t=a.itemTop;d.splice(g,1);ea(d,e);Ma(d,b,e);b.isGridVisible&&typeof a.displayRowIndex===c&&typeof a.gridItemContainer!==c&&e.gridContent.removeChild(a.gridItemContainer);
  l=e.chartContent.chartArea;typeof a.chartItem!==c&&l.removeChild(a.chartItem);n=g<d.length?d[g]:null;if(n!=null&&n.indentation<k){A(n,"indentation",false,true);n.predecessors=[];A(n,"predecessors",false,true);for(l=0;l<d.length;l++){j=d[l];if(!(j==n||typeof j.predecessors===c||j.predecessors.length==0))for(w=0;w<j.predecessors.length;w++)if(j.predecessors[w].item==n){j.predecessors.splice(w--,1);A(j,"predecessors",false,true);na(j);ra(j)}}}f!=null&&ja(f,h,false,true);for(l=g;l<d.length;l++){a=d[l];
  actualItemTop=t;typeof a.displayRowIndex!==c&&(actualItemTop=a.displayRowIndex*b.itemHeight);a.isVisible&&!(typeof a.isHidden!==c&&a.isHidden)&&(t=Math.max(t,actualItemTop+b.itemHeight));a.itemTop=actualItemTop;na(a)}ua(e.chartContent,va(d,b));Qa(d,e.chartContent,b);db(d,b)&&Sa(d);g>=d.length&&(g=d.length-1);if(g>=0){for(l=0;l<g;l++)oa(d[l]);Ta(d[g],d,e,b)}wa(d,e.chartContentContainer,b)},Kb=function(a,e){return function(d){typeof d===c&&(d=a);var b=d.ownerDocument,d=b.createElementNS("http://www.w3.org/2000/svg",
  "defs"),g=b.createElementNS("http://www.w3.org/2000/svg","linearGradient");g.setAttribute("id","BlueGradient");g.setAttribute("x1","0%");g.setAttribute("y1","0%");g.setAttribute("x2","0%");g.setAttribute("y2","100%");var f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: White");var h=b.createElementNS("http://www.w3.org/2000/svg","stop");h.setAttribute("offset","25%");h.setAttribute("style","stop-color: LightBlue");var n=b.createElementNS("http://www.w3.org/2000/svg",
  "stop");n.setAttribute("offset","100%");n.setAttribute("style","stop-color: Blue");g.appendChild(f);g.appendChild(h);g.appendChild(n);d.appendChild(g);g=b.createElementNS("http://www.w3.org/2000/svg","linearGradient");g.setAttribute("id","BlackGradient");g.setAttribute("x1","0%");g.setAttribute("y1","0%");g.setAttribute("x2","0%");g.setAttribute("y2","100%");f=b.createElementNS("http://www.w3.org/2000/svg","stop");f.setAttribute("offset","0%");f.setAttribute("style","stop-color: Black");h=b.createElementNS("http://www.w3.org/2000/svg",
  "stop");h.setAttribute("offset","10%");h.setAttribute("style","stop-color: White");n=b.createElementNS("http://www.w3.org/2000/svg","stop");n.setAttribute("offset","20%");n.setAttribute("style","stop-color: Gray");var k=b.createElementNS("http://www.w3.org/2000/svg","stop");k.setAttribute("offset","60%");k.setAttribute("style","stop-color: Black");g.appendChild(f);g.appendChild(h);g.appendChild(n);g.appendChild(k);d.appendChild(g);g=b.createElementNS("http://www.w3.org/2000/svg","marker");g.setAttribute("id",
  "ArrowMarker");g.setAttribute("viewBox","0 0 10 10");g.setAttribute("refX","0");g.setAttribute("refY","5");g.setAttribute("markerUnits","strokeWidth");g.setAttribute("markerWidth",(4.5*(e.arrowSize?e.arrowSize:1)).toString());g.setAttribute("markerHeight",(3.5*(e.arrowSize?e.arrowSize:1)).toString());g.setAttribute("orient","auto");b=b.createElementNS("http://www.w3.org/2000/svg","path");switch(e.theme){default:b.setAttribute("fill","#3b87d9");break;case "Aero":b.setAttribute("fill","Blue")}b.setAttribute("d",
  "M 0 0 L 10 5 L 0 10 z");g.appendChild(b);d.appendChild(g);return d}},Ob=function(a){return function(e){var d=e.ganttChartView,b=e.ganttChartView.ownerDocument,g=b.createElementNS("http://www.w3.org/2000/svg","title");g.appendChild(T(b,e.content));if(typeof a.areToolTipsSimplified===c||!a.areToolTipsSimplified)if(typeof e.loadChartView===c){if(typeof e.scheduleChartView===c&&e.parent){g.appendChild(b.createTextNode("\n"));g.appendChild(b.createTextNode("Parent: "+e.parent.content))}if(typeof e.scheduleChartView!==
  c&&e.scheduleChartItem){g.appendChild(b.createTextNode("\n"));g.appendChild(b.createTextNode("Row: "+e.scheduleChartItem.content))}if(e.hasChildren){g.appendChild(b.createTextNode("\n"));g.appendChild(b.createTextNode("Children: "+e.children.length))}g.appendChild(b.createTextNode("\n"));g.appendChild(b.createTextNode((!e.isMilestone?"Start: ":"")+a.dateTimeFormatter(x(e.start))));if(!e.isMilestone){g.appendChild(b.createTextNode("\n"));g.appendChild(b.createTextNode("Finish: "+a.dateTimeFormatter(x(e.finish))))}if(a.areTaskAssignmentsVisible&&
  e.assignmentsContent){g.appendChild(b.createTextNode("\n"));g.appendChild(b.createTextNode("Assignments: "+e.assignmentsContent))}if(!e.isMilestone){g.appendChild(b.createTextNode("\n"));g.appendChild(b.createTextNode("Effort: "+d.getItemTotalEffort(e)/36E5+"h"));if(a.isTaskCompletedEffortVisible){d=d.getItemCompletion(e);if(!isNaN(d)){g.appendChild(b.createTextNode("\n"));g.appendChild(b.createTextNode("Completed: "+Math.round(d*1E4)/100+"%"))}}}if(a.areTaskDependenciesVisible&&e.predecessors&&e.predecessors.length>
  0){g.appendChild(b.createTextNode("\n"));for(var d="",f=0;f<e.predecessors.length;f++){var h=e.predecessors[f];if(h.item){d.length>0&&(d=d+", ");d=d+h.item.content;h.dependencyType&&(d=d+(" ("+fc(h.dependencyType)+")"))}}g.appendChild(b.createTextNode("Predecessors: "+d))}}else if(!isNaN(e.units)){g.appendChild(b.createTextNode("\n"));g.appendChild(b.createTextNode("Allocation: "+Math.round(e.units*1E4)/100+"%"))}return g}},Pb=function(a){return function(e){var d=e.ganttChartView,b=typeof a!==c?a:
  d.settings;if(b.areResourceImagesVisibleAsAssignments){var g=d.chartContent.childNodes[0].childNodes[0];if(!d.chartContent.hasClipPathForResourceImagesBeenInitialized){var f=document.createElementNS("http://www.w3.org/2000/svg","clipPath");f.setAttribute("id","resourceImageClipPath");f.setAttribute("clipPathUnits","objectBoundingBox");var h=document.createElementNS("http://www.w3.org/2000/svg","circle");h.setAttribute("cx",0.5);h.setAttribute("cy",0.5);h.setAttribute("r",0.5);f.appendChild(h);g.appendChild(f);
  d.chartContent.hasClipPathForResourceImagesBeenInitialized=true}var n=document.createElementNS("http://www.w3.org/2000/svg","g");n.setAttribute("id","assignmentsGroup");var k=d.getChartPosition(e.finish)+b.barHeight/3+2;if(e.isMilestone||e.hasChildren&&(typeof e.isSummaryEnabled===c||e.isSummaryEnabled))k=k+(b.barHeight/2+(e.isMilestone?b.barHeight/3:0));var j=0;ha(e).forEach(function(a){var d=a.key,f;if(typeof b.resourceImageUrls!==c){var g=$(b.resourceImageUrls,d);if(g>=0)f=b.resourceImageUrls[g].value}if(f&&
  b.itemHeight>4){var h=b.itemHeight-4,g=document.createElementNS("http://www.w3.org/2000/svg","image");g.setAttribute("x",k+28*j);g.setAttribute("y",2);g.setAttribute("width",h+"px");g.setAttribute("height",h+"px");if(e.isExported&&f.indexOf("://")!=0){h=f.indexOf("/")!=0?window.location.pathname.substr(0,window.location.pathname.lastIndexOf("/")+1):"";f=window.location.protocol+"//"+window.location.host+h+f}g.setAttribute("href",f);g.setAttribute("clip-path","url(#resourceImageClipPath)");n.appendChild(g);
  a=a.value!=1?" "+Math.round(a.value*1E4)/100+"%":"";f=document.createElementNS("http://www.w3.org/2000/svg","title");f.appendChild(document.createTextNode(d+a));g.appendChild(f)}j++});return n}d=document.createElementNS("http://www.w3.org/2000/svg","text");k=I(e.finish,b);if(e.isMilestone||e.hasChildren&&(typeof e.isSummaryEnabled===c||e.isSummaryEnabled))k=k+b.barHeight/2;d.setAttribute("x",k+7);d.setAttribute("y",b.barMargin+b.barHeight-b.barHeight/5);g=b.target!="Phone"?e.assignmentsContent:e.content;
  typeof g===c&&(g="");d.appendChild(document.createTextNode(g));typeof b.assignmentsClass!==c?d.setAttribute("class",b.assignmentsClass):typeof b.assignmentsStyle!==c&&d.setAttribute("style",b.assignmentsStyle);return d}},tb=function(a){var e=a.ganttChartView.ownerDocument;if(typeof a.chartItemArea===c)a.chartItemArea=e.createElementNS("http://www.w3.org/2000/svg","g");for(e=a.chartItemArea.childNodes.length;e-- >0;)a.chartItemArea.removeChild(a.chartItemArea.childNodes[e]);return a.chartItemArea},
  ub=function(a,e,d,b,c){var f=a.ganttChartView,h=f.settings,n=f.ownerDocument,f=h.barMargin,k=h.barHeight,j=h.barHeight,l=n.createElementNS("http://www.w3.org/2000/svg","foreignObject"),w=e.childNodes.length-6,b=b!=null?b-d-4-(a.hasChildren?4:0):200,t=n.createTextNode(a.label),n=n.createElement("span");l.setAttribute("width",b);l.setAttribute("height",j);if(a.isMilestone){l.setAttribute("x",d-200-k);l.setAttribute("y",f+k/2);l.setAttribute("style","text-overflow: ellipsis; white-space: nowrap; text-align: right; font-size: "+
  (k/2+1)+"px; color: "+c)}else if(a.hasChildren){l.setAttribute("x",d+4);l.setAttribute("y",f+k/4-2);l.setAttribute("style","text-overflow: ellipsis; white-space: nowrap; font-size: "+k/2+"px; color: "+c)}else{l.setAttribute("x",d+2);l.setAttribute("y",h.barMargin+h.barHeight/4);l.setAttribute("style","text-overflow: ellipsis; white-space: nowrap; font-size: "+(k/2+1)+"px; color: "+c)}n.appendChild(t);l.appendChild(n);e.insertBefore(l,e.childNodes[w]);return n},Lb=function(a,e,d){return function(b){var g=
  typeof e!==c?e:b.ganttChartView,f=typeof d!==c?d:g.settings,h=typeof a!==c?a:g.items,n=g.ownerDocument,k=tb(b);if(f.isBaselineVisible&&typeof b.baselineStart!==c&&typeof b.baselineFinish!==c){var j=I(b.baselineStart,f),l=Math.max(I(b.baselineFinish,f),j+4),w=n.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("x",j);w.setAttribute("y",f.barMargin/2);w.setAttribute("width",Math.max(0,l-j-1));w.setAttribute("height",f.barHeight);w.setAttribute("rx",f.barCornerRadius);w.setAttribute("ry",
  f.barCornerRadius);j=f.baselineBarClass;if(typeof b.baselineBarClass!==c)j=b.baselineBarClass;if(typeof j!==c)w.setAttribute("class",j);else{j=f.baselineBarStyle;if(typeof b.baselineBarStyle!==c)j=b.baselineBarStyle;typeof j!==c&&w.setAttribute("style",j)}k.appendChild(w)}var w=I(b.start,f),j=Math.max(I(b.finish,f),w+4),l=I(b.completedFinish,f),t=n.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",w);t.setAttribute("y",f.barMargin);t.setAttribute("width",Math.max(0,j-w-1));t.setAttribute("height",
  f.barHeight);t.setAttribute("rx",f.barCornerRadius);t.setAttribute("ry",f.barCornerRadius);var y=f.standardBarClass;if(typeof b.standardBarClass!==c)y=b.standardBarClass;if(typeof b.barClass!==c)y=b.barClass;if(typeof y!==c)t.setAttribute("class",y);else{y=f.standardBarStyle;if(typeof b.standardBarStyle!==c)y=b.standardBarStyle;if(typeof b.barStyle!==c)y=b.barStyle;typeof y!==c&&t.setAttribute("style",y)}k.appendChild(t);if(f.isTaskCompletedEffortVisible){t=n.createElementNS("http://www.w3.org/2000/svg",
  "rect");t.setAttribute("x",w+0.65);t.setAttribute("y",f.barMargin+f.completedBarMargin);t.setAttribute("width",Math.max(0,l-w-1-1.3));t.setAttribute("height",f.completedBarHeight);t.setAttribute("rx",f.completedBarCornerRadius);t.setAttribute("ry",f.completedBarCornerRadius);y=f.standardCompletedBarClass;if(typeof b.standardCompletedBarClass!==c)y=b.standardCompletedBarClass;if(typeof b.completedBarClass!==c)y=b.completedBarClass;if(typeof y!==c)t.setAttribute("class",y);else{y=f.standardCompletedBarStyle;
  if(typeof b.standardCompletedBarStyle!==c)y=b.standardCompletedBarStyle;if(typeof b.completedBarStyle!==c)y=b.completedBarStyle;typeof y!==c&&t.setAttribute("style",y)}k.appendChild(t)}if(f.areStandardTaskLabelsVisible&&b.label){t=ub(b,k,w,j,b.labelColor?b.labelColor:f.standardLabelColor?f.standardLabelColor:"black");y=f.standardLabelClass;if(typeof b.labelClass!==c)y=b.labelClass;if(typeof y!==c)t.setAttribute("class",y);else{y=f.standardLabelStyle;if(typeof b.labelStyle!==c)y=b.labelStyle;typeof y!==
  c&&t.setAttribute("style",y)}}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly===c||!b.isReadOnly)&&(typeof b.isBarReadOnly===c||!b.isBarReadOnly)){t=n.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",w);t.setAttribute("y",f.barMargin);t.setAttribute("width",Math.max(0,j-w-1));t.setAttribute("height",f.barHeight);t.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");f.isTaskStartReadOnly||k.appendChild(t);y=n.createElementNS("http://www.w3.org/2000/svg",
  "rect");y.setAttribute("x",w-4);y.setAttribute("y",f.barMargin);y.setAttribute("width",4);y.setAttribute("height",f.barHeight);y.setAttribute("style","fill: White; fill-opacity: 0; cursor: w-resize");f.isDraggingTaskStartEndsEnabled&&(!f.isTaskStartReadOnly&&f.interaction!="TouchEnabled")&&k.appendChild(y);var p=n.createElementNS("http://www.w3.org/2000/svg","rect");p.setAttribute("x",j-4);p.setAttribute("y",f.barMargin);p.setAttribute("width",8);p.setAttribute("height",f.barHeight);p.setAttribute("style",
  "fill: White; fill-opacity: 0; cursor: e-resize");!f.isTaskEffortReadOnly&&f.interaction!="TouchEnabled"&&k.appendChild(p);var r=n.createElementNS("http://www.w3.org/2000/svg","rect");r.setAttribute("x",l-2);r.setAttribute("y",f.barMargin);r.setAttribute("width",6);r.setAttribute("height",f.barHeight);r.setAttribute("style","fill: White; fill-opacity: 0; cursor: ew-resize");if(!f.isTaskCompletionReadOnly&&f.isTaskCompletedEffortVisible&&f.interaction!="TouchEnabled"){k.appendChild(r);var o=n.createElementNS("http://www.w3.org/2000/svg",
  "title"),m=typeof f.areToolTipsSimplified===c||!f.areToolTipsSimplified?g.getItemCompletion(b):NaN;o.appendChild(T(n,!isNaN(m)?Math.round(m*1E4)/100+"%":""));r.appendChild(o)}vb(t,y,p,r,b,w,j,l,h,g,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){l=null;if(typeof f.allowCreatingStartDependencies===c||f.allowCreatingStartDependencies){l=n.createElementNS("http://www.w3.org/2000/svg","circle");l.setAttribute("cx",w);l.setAttribute("cy",f.barMargin+f.barHeight/2);l.setAttribute("r",
  f.barHeight/4);l.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");k.appendChild(l)}n=n.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",j-2);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");k.appendChild(n);eb(n,l,k,b,f.barMargin+f.barHeight/2,j-2,w,h,g,f)}}return k}},Mb=function(a,e,d){return function(b){var g=typeof e!==c?e:b.ganttChartView,f=typeof d!==
  c?d:g.settings,h=typeof a!==c?a:g.items,n=g.ownerDocument,k=tb(b),j=I(b.start,f),l=I(b.finish,f),w=f.barHeight*2.15/3,t=n.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",j);t.setAttribute("y",f.barMargin);t.setAttribute("width",Math.max(0,l-j-1));t.setAttribute("height",w);var y=f.summaryBarClass;if(typeof b.summaryBarClass!==c)y=b.summaryBarClass;if(typeof b.barClass!==c)y=b.barClass;if(typeof y!==c)t.setAttribute("class",y);else{var p=f.summaryBarStyle;if(typeof b.summaryBarStyle!==
  c)p=b.summaryBarStyle;if(typeof b.barStyle!==c)p=b.barStyle;typeof p!==c&&t.setAttribute("style",p)}k.appendChild(t);if(f.isTaskCompletedEffortVisible&&f.isSummaryTaskCompletedEffortVisible){t=n.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("x",j);t.setAttribute("y",f.barMargin+f.completedBarMargin*2.15/3);t.setAttribute("width",Math.max(0,l-j-1)*g.getItemCompletion(b));t.setAttribute("height",f.completedBarHeight*2.15/3);t.setAttribute("rx",f.completedBarCornerRadius);t.setAttribute("ry",
  f.completedBarCornerRadius);var r=f.summaryCompletedBarClass;if(typeof b.summaryCompletedBarClass!==c)r=b.summaryCompletedBarClass;if(typeof b.completedBarClass!==c)r=b.completedBarClass;if(typeof r!==c)t.setAttribute("class",r);else{r=f.summaryCompletedBarStyle;if(typeof b.summaryCompletedBarStyle!==c)r=b.summaryCompletedBarStyle;if(typeof b.completedBarStyle!==c)r=b.completedBarStyle;typeof r!==c&&t.setAttribute("style",r)}k.appendChild(t)}if(!b.isExpanded){t=n.createElementNS("http://www.w3.org/2000/svg",
  "line");t.setAttribute("x1",j);t.setAttribute("y1",f.barMargin+w+2.5);t.setAttribute("x2",l-1);t.setAttribute("y2",f.barMargin+w+2.5);r=f.collapsedSummaryLineClass;if(typeof b.collapsedSummaryLineClass!==c)r=b.collapsedSummaryLineClass;if(typeof r!==c)t.setAttribute("class",r);else{r=f.collapsedSummaryLineStyle;if(typeof b.collapsedSummaryLineStyle!==c)r=b.collapsedSummaryLineStyle;typeof r!==c&&t.setAttribute("style",r)}k.appendChild(t)}var r=n.createElementNS("http://www.w3.org/2000/svg","polygon"),
  t=f.barMargin-0.25,o=w+1.5,m=f.barHeight*3/4,v=f.barHeight/4,w=j-1-f.barHeight/3;r.setAttribute("points",w+","+t+" "+w+","+(t+o)+" "+(w+m/2)+","+(t+o+v)+" "+(w+m)+","+(t+o)+" "+(w+m)+","+t);typeof y!==c&&r.setAttribute("class",y);typeof p!==c&&r.setAttribute("style",p);k.appendChild(r);r=n.createElementNS("http://www.w3.org/2000/svg","polygon");w=l+f.barHeight/3;r.setAttribute("points",w+","+t+" "+w+","+(t+o)+" "+(w-m/2)+","+(t+o+v)+" "+(w-m)+","+(t+o)+" "+(w-m)+","+t);typeof y!==c&&r.setAttribute("class",
  y);typeof p!==c&&r.setAttribute("style",p);k.appendChild(r);if(f.areSummaryTaskLabelsVisible&&b.label){y=ub(b,k,j,l,b.labelColor?b.labelColor:f.summaryLabelColor?f.summaryLabelColor:"white");p=f.summaryLabelClass;if(typeof b.labelClass!==c)p=b.labelClass;if(typeof p!==c)y.setAttribute("class",p);else{p=f.summaryLabelStyle;if(typeof b.labelStyle!==c)p=b.labelStyle;typeof p!==c&&y.setAttribute("style",p)}}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly===c||!b.isReadOnly)&&(typeof b.isBarReadOnly===
  c||!b.isBarReadOnly)&&f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){y=null;if(typeof f.allowCreatingStartDependencies===c||f.allowCreatingStartDependencies){y=n.createElementNS("http://www.w3.org/2000/svg","circle");y.setAttribute("cx",j-0.5);y.setAttribute("cy",f.barMargin+f.barHeight/2);y.setAttribute("r",f.barHeight/4);y.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");k.appendChild(y)}n=n.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",
  l-0.5);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");k.appendChild(n);eb(n,y,k,b,f.barMargin+f.barHeight/2,l-1.5,j,h,g,f)}return k}},Nb=function(a,e,d){return function(b){var g=typeof e!==c?e:b.ganttChartView,f=typeof d!==c?d:g.settings,h=typeof a!==c?a:g.items,n=g.ownerDocument,k=tb(b);if(f.isBaselineVisible&&typeof b.baselineStart!==c){var j=I(b.baselineStart,f),l=n.createElementNS("http://www.w3.org/2000/svg",
  "polygon"),w=f.barMargin-1,t=f.barHeight+1;l.setAttribute("points",j+","+w+" "+(j-t/2)+","+(w+t/2)+" "+j+","+(w+t)+" "+(j+t/2)+","+(w+t/2));j=f.baselineBarClass;if(typeof b.baselineBarClass!==c)j=b.baselineBarClass;if(typeof j!==c)l.setAttribute("class",j);else{var y=f.baselineBarStyle;if(typeof b.baselineBarStyle!==c)y=b.baselineBarStyle}l.setAttribute("style",y);k.appendChild(l)}j=I(b.start,f);w=n.createElementNS("http://www.w3.org/2000/svg","polygon");l=j-1;t=f.barMargin;y=f.barHeight+1;w.setAttribute("points",
  l+","+t+" "+(l-y/2)+","+(t+y/2)+" "+l+","+(t+y)+" "+(l+y/2)+","+(t+y/2));t=f.milestoneBarClass;if(typeof b.milestoneBarClass!==c)t=b.milestoneBarClass;if(typeof b.barClass!==c)t=b.barClass;if(typeof t!==c)w.setAttribute("class",t);else{t=f.milestoneBarStyle;if(typeof b.milestoneBarStyle!==c)t=b.milestoneBarStyle;if(typeof b.barStyle!==c)t=b.barStyle;typeof t!==c&&w.setAttribute("style",t)}k.appendChild(w);if(f.areMilestoneTaskLabelsVisible&&b.label){j=ub(b,k,j,null,b.labelColor?b.labelColor:f.milestoneLabelColor?
  f.milestoneLabelColor:"black");w=f.milestoneLabelClass;if(typeof b.labelClass!==c)w=b.labelClass;if(typeof w!==c)j.setAttribute("class",w);else{w=f.milestoneLabelStyle;if(typeof b.labelStyle!==c)w=b.labelStyle;typeof w!==c&&j.setAttribute("style",w)}}if(!f.isReadOnly&&!f.isChartReadOnly&&(typeof b.isReadOnly===c||!b.isReadOnly)&&(typeof b.isBarReadOnly===c||!b.isBarReadOnly)){j=n.createElementNS("http://www.w3.org/2000/svg","rect");j.setAttribute("x",l-y/2);j.setAttribute("y",f.barMargin);j.setAttribute("width",
  y);j.setAttribute("height",y);j.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");k.appendChild(j);vb(j,null,null,null,b,l,l,l,h,g,f);if(f.areTaskDependenciesVisible&&!f.areTaskPredecessorsReadOnly&&!b.isPart){n=n.createElementNS("http://www.w3.org/2000/svg","circle");n.setAttribute("cx",l);n.setAttribute("cy",f.barMargin+f.barHeight/2);n.setAttribute("r",f.barHeight/4);n.setAttribute("style","fill: White; fill-opacity: 0; cursor: pointer");k.appendChild(n);eb(n,null,k,b,f.barMargin+
  f.barHeight/2,l,l,h,g,f)}}return k}},Qb=function(a,e){return function(d,b){var g=d.ganttChartView,f=typeof e!==c?e:g.settings,h=typeof a!==c?a:g.items,n=g.ownerDocument,g=n.createElementNS("http://www.w3.org/2000/svg","g"),k;k=Ca(b.item,h,f);var j=Ca(d,h,f),h="M ",l,w,t=f.itemHeight,y=t/2,p=t/3.5,r=2,o=false,m;if(k==j&&(typeof b.dependencyType===c||b.dependencyType=="FinishStart"||b.dependencyType=="FS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(typeof b.dependencyType===c||b.dependencyType==
  "FinishStart"||b.dependencyType=="FS"){l=I(b.item.finish,f);w=I(d.start,f)}else{l=I(b.item.start,f);w=I(d.finish,f)}k=k-j+0.5;h=h+(l+" "+(k+y)+" L "+(w+(w>l?-1:1)*(t/5-1))+" "+(k+y))}else{if(typeof b.dependencyType!==c&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){l=I(b.item.start,f);b.item.hasChildren&&(typeof b.item.isSummaryEnabled===c||b.item.isSummaryEnabled)?l=l-(f.barHeight/3+0.25):b.item.isMilestone&&(l=l-t/4);w=l-p}else{l=
  I(b.item.finish,f)-1;if(b.item.hasChildren&&(typeof b.item.isSummaryEnabled===c||b.item.isSummaryEnabled))l=l+(f.barHeight/3+0.25);else if(b.item.isMilestone)l=l+t/4;else{m=I(b.item.start,f)+4-1;l<m&&(l=m)}w=l+p}k=k-j+0.5;h=h+(l+" "+(k+y)+" L "+w+" "+(k+y));if(typeof b.dependencyType!==c&&(b.dependencyType=="FinishFinish"||b.dependencyType=="FF"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){l=I(d.finish,f)-1;if(typeof b.dependencyType!==c&&(b.dependencyType=="FinishFinish"||b.dependencyType==
  "FF")){o=true;if(d.hasChildren&&(typeof d.isSummaryEnabled===c||d.isSummaryEnabled))l=l+(f.barHeight/3+1);else if(d.isMilestone)l=l+(t/4+1);else{m=I(d.start,f)+4-1;l<m&&(l=m)}j=l+p}else if(d.isMilestone)j=l;else{m=I(d.start,f)+4;l<m&&(l=m);j=l-2.5}}else{l=I(d.start,f);if(typeof b.dependencyType!==c&&(b.dependencyType=="StartStart"||b.dependencyType=="SS")){o=true;d.hasChildren&&(typeof d.isSummaryEnabled===c||d.isSummaryEnabled)?l=l-(f.barHeight/3+1):d.isMilestone&&(l=l-(t/4+1));j=l-p}else if(d.isMilestone)j=
  l-1;else{j=l+1.5;m=I(d.finish,f);j<w&&(m-w>p*2&&d.start>=b.item.finish)&&(j=w)}}if(typeof b.dependencyType!==c&&(b.dependencyType=="StartStart"||b.dependencyType=="SS"||b.dependencyType=="StartFinish"||b.dependencyType=="SF")){if(j>w){k=k-p/6;k=k<=0?k+y:k-y;h=h+(" "+w+" "+(k+y))}}else if(j<w){k=k-p/6;k=k<=0?k+y:k-y;h=h+(" "+w+" "+(k+y))}h=h+(" "+j+" "+(k+y));k=o?y+0.5:k<=0?f.barMargin-1-r:t-f.barMargin+1+r;if(o){j>l-r&&(r=-r);l=l-r}h=h+(" "+j+" "+k);o&&(h=h+(" "+l+" "+k))}k=h;h=n.createElementNS("http://www.w3.org/2000/svg",
  "path");h.setAttribute("d",k);typeof f.dependencyLineZoneClass!==c&&h.setAttribute("class",f.dependencyLineZoneClass);typeof f.dependencyLineZoneStyle!==c&&h.setAttribute("style",f.dependencyLineZoneStyle);g.appendChild(h);n=n.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("d",k);k=f.dependencyLineClass;if(typeof b.dependencyLineClass!==c)k=b.dependencyLineClass;if(typeof k!==c)n.setAttribute("class",k);else{f=f.dependencyLineStyle;if(typeof b.dependencyLineStyle!==c)f=b.dependencyLineStyle;
  typeof f!==c&&n.setAttribute("style",f)}g.appendChild(n);return g}},Rb=function(a){return function(e,d){var b=e.ganttChartView.ownerDocument,g=b.createElementNS("http://www.w3.org/2000/svg","title");g.appendChild(T(b,d.item.content+" - "+e.content));if(typeof a.areToolTipsSimplified===c||!a.areToolTipsSimplified){if(d.dependencyType){g.appendChild(b.createTextNode("\n"));g.appendChild(T(b,"Type: "+fc(d.dependencyType)))}if(d.lag){g.appendChild(b.createTextNode("\n"));g.appendChild(T(b,"Lag: "+d.lag/
  36E5+"h"))}}return g}},fc=function(a){switch(a){case "StartStart":case "SS":return"SS";case "FinishFinish":case "FF":return"FF";case "StartFinish":case "SF":return"SF";default:return"FS"}},A=function(a,e,d,b){if(typeof a.ganttChartView!==c){var g=a.ganttChartView,f=g.settings;if(e=="start"||e=="minStart"||e=="maxStart"){if(typeof a.minStart!==c&&a.start<a.minStart){a.start=a.minStart;if(typeof a.loadChartItem===c)a.start=P(a.start,f,true,typeof a.isMilestone!==c&&a.isMilestone,D(a));if(d)a.preferredStart=
  a.start}else if(typeof a.maxStart!==c&&a.start>a.maxStart){a.start=a.maxStart;if(typeof a.loadChartItem===c)a.start=P(a.start,f,true,typeof a.isMilestone!==c&&a.isMilestone,D(a));if(d)a.preferredStart=a.start}if(a.finish<a.start){a.finish=a.start;A(a,"finish",false,true)}if(a.completedFinish<a.start){a.completedFinish=a.start;A(a,"completedFinish",false,true)}else if(a.completedFinish>a.finish){a.completedFinish=a.finish;A(a,"completedFinish",false,true)}}else if(e=="finish"||e=="minFinish"||e=="maxFinish"){if(typeof a.maxFinish!==
  c&&a.finish>a.maxFinish){a.finish=a.maxFinish;if(typeof a.loadChartItem===c)a.finish=P(a.finish,f,typeof a.isMilestone!==c&&a.isMilestone,true,D(a))}else if(typeof a.minFinish!==c&&a.finish<a.minFinish){a.finish=a.minFinish;if(typeof a.loadChartItem===c)a.finish=P(a.finish,f,typeof a.isMilestone!==c&&a.isMilestone,true,D(a))}if(a.finish<a.start){a.finish=a.start;A(a,"finish",false,true)}if(a.completedFinish<a.start){a.completedFinish=a.start;A(a,"completedFinish",false,true)}else if(a.completedFinish>
  a.finish){a.completedFinish=a.finish;A(a,"completedFinish",false,true)}}if(g.isTimingInformationInitialized){var h=g.items,n,k;if(e=="indentation"||e=="predecessors")for(n=0;n<h.length;n++){k=h[n];typeof k.dependsOf!==c&&delete k.dependsOf}if(e=="predecessors"&&f.alwaysHandleInvalidDependencies){k=a;typeof k.predecessors!==c&&k.predecessors.length>0&&Aa(k,h,f,g,true)}else if((e=="predecessors"||e=="start"||e=="finish")&&typeof a.isDuringPropertyChangeTaskDependencyConstraintsEnsuring===c&&f.areTaskDependencyConstraintsEnabled&&
  (f.areTaskDependencyConstraintsEnabledWhileDragging||typeof g.isDuringTimeDragOperation===c)){a.isDuringPropertyChangeTaskDependencyConstraintsEnsuring=true;for(k=a.parent;k!=null;){typeof k.predecessors!==c&&k.predecessors.length>0&&Aa(k,h,f,g);k=k.parent}k=a;for(typeof k.predecessors!==c&&k.predecessors.length>0?Aa(k,h,f,g):wb(k,f);k!=null;){if(typeof k.successors===c){k.successors=[];for(n=0;n<h.length;n++){var j=h[n];if(!(j==k||typeof j.predecessors===c||j.predecessors.length==0))for(var l=0;l<
  j.predecessors.length;l++)if(j.predecessors[l].item==k){k.successors.push(j);break}}}for(n=0;n<k.successors.length;n++)Aa(k.successors[n],h,f,g);k=k.parent}delete a.isDuringPropertyChangeTaskDependencyConstraintsEnsuring}a.isPart&&a.ganttChartItem&&A(a.ganttChartItem,"parts",false,true)}if(a.isSetAsCompleted&&(e=="start"||e=="finish"||e=="completedFinish"))a.isSetAsCompleted=false;if((e=="start"||e=="finish")&&!a.hasChildren&&a.hasFixedEffort&&typeof a.fixedEffort!==c){h=g.getItemEffort(a)/a.fixedEffort;
  k="";for(n=0;n<a.fixedEffortAssignments.length;n++){j=a.fixedEffortAssignments[n];k.length>0&&(k=k+", ");l=Math.floor(j.value/h*1E6)/1E6;k=k+(j.key+(l!=1?" ["+l*100+"%]":""))}g.setItemAssignmentsContent(a,k)}f.itemPropertyChangeHandler(a,e,d,b);e=="isExpanded"?typeof a.ganttChartView!==c&&typeof a.ganttChartView.settings.itemExpansionChangeHandler!==c&&a.ganttChartView.settings.itemExpansionChangeHandler(a,a.isExpanded):e=="isSelected"&&typeof a.ganttChartView!==c&&typeof a.ganttChartView.settings.itemSelectionChangeHandler!==
  c&&a.ganttChartView.settings.itemSelectionChangeHandler(a,a.isSelected,d);typeof a.scheduleChartView!==c&&e=="content"&&a.scheduleChartView.refreshScheduleChartItem(a)}},wb=function(a,e){if(typeof a.isAwaitingPreferredStartUpdates===c)if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))for(var d=0;d<a.children.length;d++)wb(a.children[d],e);else if(typeof a.preferredStart!==c&&a.preferredStart<a.start){a.isAwaitingPreferredStartUpdates=true;var b=a.start.valueOf(),g=a.finish.valueOf(),
  f=a.completedFinish.valueOf();effort=N(a.start,a.finish,e,D(a));completedEffort=N(a.start,a.completedFinish,e,D(a));a.start=a.preferredStart;a.finish=Q(a.start,effort,e,D(a));a.completedFinish=Q(a.start,completedEffort,e,D(a));a.start.valueOf()!=b&&A(a,"start",false,false);a.finish.valueOf()!=g&&A(a,"finish",false,false);a.completedFinish.valueOf()!=f&&A(a,"completedFinish",false,false);setTimeout(function(){a.start.valueOf()!=b&&A(a,"start",false,true);a.finish.valueOf()!=g&&A(a,"finish",false,true);
  a.completedFinish.valueOf()!=f&&A(a,"completedFinish",false,true);(a.start.valueOf()!=b||a.finish.valueOf()!=g||a.completedFinish.valueOf()!=f)&&Z(a);delete a.isAwaitingPreferredStartUpdates},1)}},Aa=function(a,e,d,b,g){if(g){if(b.isBasicTimingInformationInitialized){for(var g=[],f,h=false,b=0;b<a.predecessors.length;b++){f=a.predecessors[b];if(typeof f.item===c||e.indexOf(f.item)<0||Fa(f.item,a)){d.invalidPredecessorDetectionHandler&&d.invalidPredecessorDetectionHandler(f,a,f.item);h=true}else g.push(f)}a.predecessors=
  g;if(h){A(a,"predecessors",false,true);typeof a.ganttChartView!==c&&Ja(a)}}}else if(b.isBasicTimingInformationInitialized&&(typeof a.areDependencyConstraintsEnabled===c||a.areDependencyConstraintsEnabled)){wb(a,d);g=[];h=false;for(b=0;b<a.predecessors.length;b++){f=a.predecessors[b];if(typeof f.item===c||e.indexOf(f.item)<0||Fa(f.item,a)){d.invalidPredecessorDetectionHandler&&d.invalidPredecessorDetectionHandler(f,a,f.item);h=true}else g.push(f)}a.predecessors=g;if(h){A(a,"predecessors",false,true);
  typeof a.ganttChartView!==c&&Ja(a)}for(b=0;b<a.predecessors.length;b++){f=a.predecessors[b];gc(a,f,e,d)}}},gc=function(a,e,d,b){if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))for(var g=0;g<a.children.length;g++)gc(a.children[g],e,d,b);else if(!(typeof b.areDependencyConstraintsAppliedOnMilestones!==c&&!b.areDependencyConstraintsAppliedOnMilestones&&a.isMilestone||typeof b.areDependencyConstraintsAppliedOnStartedTasks!==c&&!b.areDependencyConstraintsAppliedOnStartedTasks&&Ka(a))){var f=
  e.item,h,d=false;if(typeof e.dependencyType===c||e.dependencyType==""||e.dependencyType=="FinishStart"||e.dependencyType=="FS"){f=f.finish;typeof e.lag!==c&&e.lag!=0&&(f=Q(f,e.lag,b,D(a)));if(a.start<f){if(!a.isMilestone&&(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))){g=N(a.start,a.finish,b,D(a));h=N(a.start,a.completedFinish,b,D(a))}if(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){var n=a.start.valueOf(),e=a.finish.valueOf(),k=a.completedFinish.valueOf();
  a.start=P(pa(f,b),b,true,a.isMilestone,D(a));a.start.valueOf()!=n&&A(a,"start",false,true);if(a.isMilestone){a.finish=a.start;a.finish.valueOf()!=e&&A(a,"finish",false,true);a.completedFinish=a.start}else{a.finish=Q(a.start,g,b,D(a));a.finish.valueOf()!=e&&A(a,"finish",false,true);a.completedFinish=Q(a.start,h,b,D(a))}a.completedFinish.valueOf()!=k&&A(a,"completedFinish",false,true);d=true}}}else if(e.dependencyType=="StartStart"||e.dependencyType=="SS"){f=f.start;typeof e.lag!==c&&e.lag!=0&&(f=Q(f,
  e.lag,b,D(a)));if(a.start<f){if(!a.isMilestone&&(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))){g=N(a.start,a.finish,b,D(a));h=N(a.start,a.completedFinish,b,D(a))}if(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){n=a.start.valueOf();e=a.finish.valueOf();k=a.completedFinish.valueOf();a.start=P(pa(f,b),b,true,a.isMilestone,D(a));a.start.valueOf()!=n&&A(a,"start",false,true);if(a.isMilestone){a.finish=a.start;a.finish.valueOf()!=e&&A(a,"finish",false,true);
  a.completedFinish=a.start}else{a.finish=Q(a.start,g,b,D(a));a.finish.valueOf()!=e&&A(a,"finish",false,true);a.completedFinish=Q(a.start,h,b,D(a))}a.completedFinish.valueOf()!=k&&A(a,"completedFinish",false,true);d=true}}}else if(e.dependencyType=="FinishFinish"||e.dependencyType=="FF"){f=f.finish;typeof e.lag!==c&&e.lag!=0&&(f=Q(f,e.lag,b,D(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))){e=a.finish.valueOf();k=a.completedFinish.valueOf();a.finish=P(pa(f,
  b),b,a.isMilestone,true,D(a));if(a.finish<a.start)a.finish=a.start;a.finish.valueOf()!=e&&A(a,"finish",false,true);if(a.isMilestone){if(a.completedFinish!=a.start){a.completedFinish=a.start;a.completedFinish.valueOf()!=k&&A(a,"completedFinish",false,true)}}else if(a.completedFinish>a.finish){a.completedFinish=a.finish;a.completedFinish.valueOf()!=k&&A(a,"completedFinish",false,true)}d=true}}else if(e.dependencyType=="StartFinish"||e.dependencyType=="SF"){f=f.start;typeof e.lag!==c&&e.lag!=0&&(f=Q(f,
  e.lag,b,D(a)));if(a.finish>f&&(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))){e=a.finish.valueOf();k=a.completedFinish.valueOf();a.finish=P(pa(f,b),b,a.isMilestone,true,D(a));if(a.finish<a.start)a.finish=a.start;a.finish.valueOf()!=e&&A(a,"finish",false,true);if(a.isMilestone){if(a.completedFinish!=a.start){a.completedFinish=a.start;a.completedFinish.valueOf()!=k&&A(a,"completedFinish",false,true)}}else if(a.completedFinish>a.finish){a.completedFinish=a.finish;a.completedFinish.valueOf()!=
  k&&A(a,"completedFinish",false,true)}if(a.start.valueOf()!=n||a.finish.valueOf()!=e||a.completedFinish.valueOf()!=k)d=true}}if(d&&!(typeof a.ganttChartView===c||typeof a.isAwaitingEnsureItemDependencyConstraintsUpdates!==c))if(typeof a.ganttChartView!==c&&!a.ganttChartView.isTimingInformationInitialized)Z(a);else{a.isAwaitingEnsureItemDependencyConstraintsUpdates=true;setTimeout(function(){Z(a);delete a.isAwaitingEnsureItemDependencyConstraintsUpdates},0)}}},Fa=function(a,e){if(typeof a.dependsOf!==
  c&&typeof a.dependsOf[e.index]!==c)return a.dependsOf[e.index];if(typeof a.dependsOf===c)a.dependsOf={};if(a==e)return true;var d=hc(a);if(d.indexOf(e)>=0)return a.dependsOf[e.index]=true;var b=hc(e);if(b.indexOf(a)>=0)return a.dependsOf[e.index]=true;var g=xb(a),f,h;for(f=0;f<g.length;f++){h=g[f];if(h==e||h==a||d.indexOf(h)>=0||b.indexOf(h)>=0||Fa(h,e))return a.dependsOf[e.index]=true}for(g=0;g<d.length;g++){var n=xb(d[g]);for(f=0;f<n.length;f++){h=n[f];if(h==e||h==a||d.indexOf(h)>=0||b.indexOf(h)>=
  0||Fa(h,e))return a.dependsOf[e.index]=true}}d=a.children;for(f=0;f<d.length;f++){b=d[f];if(typeof b.predecessors!==c&&b.predecessors.length>0&&Fa(b,e))return a.dependsOf[e.index]=true}return a.dependsOf[e.index]=false},hc=function(a){for(var e=[];typeof a.parent!==c&&a.parent!=null;){(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)&&e.push(a.parent);a=a.parent}return e},xb=function(a){var e=[];if(typeof a.predecessors!==c&&a.predecessors!=null)for(var d=0;d<a.predecessors.length;d++)typeof a.predecessors[d].item!==
  c&&e.push(a.predecessors[d].item);return e},Fc=function(a,e){for(var d=0;d<a.length;d++){var b=a[d],c=e==null||e(b);b.isHidden=!c;if(c)for(b=b.parent;b!=null;){b.isHidden=false;b=b.parent}}},ic=function(a,e,d){return P(a,e,true,true,d)},sa=function(a,e,d){return P(a,e,true,false,d)},P=function(a,e,d,b,g){var f=typeof g!==c&&typeof g.workingDayStart!==c?g.workingDayStart:e.visibleDayStart,h=typeof g!==c&&typeof g.workingDayFinish!==c?g.workingDayFinish:e.visibleDayFinish,n=typeof g!==c&&typeof g.workingWeekStart!==
  c?g.workingWeekStart:e.workingWeekStart,k=typeof g!==c&&typeof g.workingWeekFinish!==c?g.workingWeekFinish:e.workingWeekFinish,e=typeof g!==c&&typeof g.specialNonworkingDays!==c?g.specialNonworkingDays:e.specialNonworkingDays,g=Y(a),a=la(a);if(a<f||!d&&a==f)if(d)a=f;else{g=Pa(g);a=h}if(a>h||!b&&a==h)if(b)a=h;else{g=ba(g);a=f}for(b=ma(g);b<n||b>k||Yb(g,e);){if(d){b++;g=ba(g);a=f}else{b--;g=Pa(g);a=h}for(;b<0;)b=b+7;for(;b>=7;)b=b-7}return new Date(g.valueOf()+a)},N=function(a,e,d,b){if(e.valueOf()<
  a.valueOf())return-N(e,a,d,b);if(e.valueOf()==a.valueOf())return 0;var g=typeof b!==c&&typeof b.workingDayStart!==c?b.workingDayStart:d.visibleDayStart,f=typeof b!==c&&typeof b.workingDayFinish!==c?b.workingDayFinish:d.visibleDayFinish,h=typeof b!==c&&typeof b.workingWeekStart!==c?b.workingWeekStart:d.workingWeekStart,n=typeof b!==c&&typeof b.workingWeekFinish!==c?b.workingWeekFinish:d.workingWeekFinish,b=typeof b!==c&&typeof b.specialNonworkingDays!==c?b.specialNonworkingDays:d.specialNonworkingDays,
  d=0,k=Y(a),a=la(a);if(a<g)a=g;else if(a>=f){k=ba(k);a=g}for(var j=Y(e);k<j;){var l=ma(k);l>=h&&(l<=n&&!Yb(k,b))&&(d=d+(f-a));k=ba(k);a=g}e=la(e);e<g?e=g:e>f&&(e=f);e>a&&(d=d+(e-a));return d},Q=function(a,e,d,b){if(e<0)return Ua(-e,a,d,b);a=P(a,d,true,false,b);if(e==0)return a;var g=typeof b!==c&&typeof b.workingDayStart!==c?b.workingDayStart:d.visibleDayStart,f=typeof b!==c&&typeof b.workingDayFinish!==c?b.workingDayFinish:d.visibleDayFinish,h=la(a);if(h+e<f)return new Date(a.valueOf()+e);h=f-h;a=
  new Date(a.valueOf()+h);for(e=e-h;e>0;){a=la(a)>0?P(ba(Y(a)),d,true,false,b):P(Y(a),d,true,false,b);if(g+e<f)return new Date(a.valueOf()+e);h=f-g;a=new Date(a.valueOf()+h);e=e-h}return new Date(a.valueOf())},Ua=function(a,e,d,b){if(a<0)return Q(e,-a,d,b);e=P(e,d,false,true,b);if(a==0)return e;var g=typeof b!==c&&typeof b.workingDayStart!==c?b.workingDayStart:d.visibleDayStart,f=typeof b!==c&&typeof b.workingDayFinish!==c?b.workingDayFinish:d.visibleDayFinish,h=la(e);if(h-a>g)return new Date(e.valueOf()-
  a);h=h-g;e=new Date(e.valueOf()-h);for(a=a-h;a>0;){e=la(e)<864E5?P(Y(e),d,false,true,b):P(Pa(Y(e)),d,false,true,b);if(f-a>g)return new Date(e.valueOf()-a);h=f-g;e=new Date(e.valueOf()-h);a=a-h}return new Date(e.valueOf())},fb=function(a,e,d,b,c){return N(a,e,b,c)/N(a,d,b,c)},jc=function(a,e,d,b,c){return Q(a,e*N(a,d,b,c),b,c)},Va=function(a){for(var e=0,a=ha(a),d=0;d<a.length;d++)e=e+a[d].value;e==0&&(e=1);return e},yb=function(a){if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){for(var e=
  0,a=a.children,d=0;d<a.length;d++)e=e+yb(a[d]);return e}return a.ganttChartView.getItemEffort(a)*Va(a)},zb=function(a){if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){for(var e=0,a=a.children,d=0;d<a.length;d++)e=e+zb(a[d]);return e}return a.ganttChartView.getItemCompletedEffort(a)*Va(a)},D=function(a){if(a.schedule)return a.schedule;if(a.scheduleChartItem)return a.scheduleChartItem.schedule;var e=ha(a);if(e){for(var d=-Infinity,b,c=0;c<e.length;c++){var f=e[c];if(f.value>d){b=
  f.key;d=f.value}}if((a=a.ganttChartView)&&a.settings&&a.settings.resourceSchedules){b=$(a.settings.resourceSchedules,b);return b<0||!a.settings.resourceSchedules[b]?void 0:a.settings.resourceSchedules[b].value}}},vb=function(a,e,d,b,g,f,h,n,k,j,l){function w(b,d){j.isDuringTimeDragOperation=true;j.draggingItem=g;j.dragType="Start";j.style.cursor=a.style.cursor;j.draggingInitialX=b.clientX;j.draggingInitialStartPosition=f;j.draggingInitialFinishPosition=h;j.draggingInitialCompletedFinishPosition=n;
  if(DlhSoft.Controls.ToolTip&&l.useUpdatingToolTips&&!d){(t=DlhSoft.Controls.ToolTip.get(a))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+l.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));
  t.setContent(l.dateTimeFormatter(x(g.start))+" \u2013 "+l.dateTimeFormatter(x(g.finish)));t.show();t.originalX=t.x;j.toolTip=t}}var t;a.addEventListener("mousedown",u(j,a,"mousedown",function(a){if(a.button==0){w(a);a.preventDefault()}},true),true);a.addEventListener("touchstart",u(j,a,"touchstart",function(a){w(a.touches[0],true);a.preventDefault();a.target.addEventListener("touchmove",u(j,a.target,"touchmove",g.touchMoveHandler));a.target.addEventListener("touchend",u(j,a.target,"touchend",g.touchEndHandler))},
  true),true);if(e!=null){var y=function(b,d){j.isDuringTimeDragOperation=true;j.draggingItem=g;j.dragType="StartOnly";j.style.cursor=a.style.cursor;j.draggingInitialX=b.clientX;j.draggingInitialStartPosition=f;if(DlhSoft.Controls.ToolTip&&l.useUpdatingToolTips&&!d){(t=DlhSoft.Controls.ToolTip.get(e))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,e,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+
  l.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));t.setContent(l.dateTimeFormatter(x(g.start))+" \u2013");t.show();t.setHorizontalPosition(t.x+4);t.originalX=t.x;j.toolTip=t}};e.addEventListener("mousedown",u(j,e,"mousedown",function(a){if(a.button==0){y(a);a.preventDefault()}},true),true);
  e.addEventListener("touchstart",u(j,e,"touchstart",function(a){y(a.touches[0],true);a.preventDefault();a.target.addEventListener("touchmove",u(j,a.target,"touchmove",g.touchMoveHandler));a.target.addEventListener("touchend",u(j,a.target,"touchend",g.touchEndHandler))},true),true)}if(d!=null){var p=function(a,b){j.isDuringTimeDragOperation=true;j.draggingItem=g;j.dragType="Finish";j.style.cursor=d.style.cursor;j.draggingInitialX=a.clientX;j.draggingInitialFinishPosition=h;if(DlhSoft.Controls.ToolTip&&
  l.useUpdatingToolTips&&!b){(t=DlhSoft.Controls.ToolTip.get(d))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,d,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+l.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));
  t.setContent("\u2013 "+l.dateTimeFormatter(x(g.finish)));t.show();t.setHorizontalPosition(t.x-t.contentContainer.clientWidth);t.originalX=t.x;j.toolTip=t}};d.addEventListener("mousedown",u(j,d,"mousedown",function(a){if(a.button==0){p(a);a.preventDefault()}},true),true);d.addEventListener("touchstart",u(j,d,"touchstart",function(a){p(a.touches[0],true);a.preventDefault();a.target.addEventListener("touchmove",u(j,a.target,"touchmove",g.touchMoveHandler));a.target.addEventListener("touchend",u(j,a.target,
  "touchend",g.touchEndHandler))},true),true)}if(b!=null){var r=function(a,d){j.isDuringTimeDragOperation=true;j.draggingItem=g;j.dragType="CompletedFinish";j.style.cursor=b.style.cursor;j.draggingInitialX=a.clientX;j.draggingInitialCompletedFinishPosition=n;if(DlhSoft.Controls.ToolTip&&l.useUpdatingToolTips&&!d){(t=DlhSoft.Controls.ToolTip.get(b))||(t=DlhSoft.Controls.ToolTip.initialize(void 0,b,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+
  l.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));var e=fb(g.start,g.completedFinish,g.finish,l,D(g));if(!isNaN(e)){t.setContent(Math.round(e*1E4)/100+"%");t.show();t.setHorizontalPosition(t.x+2);t.originalX=t.x;j.toolTip=t}}};b.addEventListener("mousedown",u(j,b,"mousedown",function(a){if(a.button==
  0){r(a);a.preventDefault()}},true),true);b.addEventListener("touchstart",u(j,b,"touchstart",function(a){r(a.touches[0],true);a.preventDefault();a.target.addEventListener("touchmove",u(j,a.target,"touchmove",g.touchMoveHandler));a.target.addEventListener("touchend",u(j,a.target,"touchend",g.touchEndHandler))},true),true)}if(typeof j.draggableItems===c)j.draggableItems=[];for(var o=false,m=0;m<j.draggableItems.length;m++)if(j.draggableItems[m]==g){o=true;break}if(!o){var v=function(a,b){if(!(typeof j.draggingItem===
  c||j.draggingItem!=g||j.dragType!="Start"&&j.dragType!="StartOnly"&&j.dragType!="Finish"&&j.dragType!="CompletedFinish")){var d=a.clientX-j.draggingInitialX;kc(a.clientX,j);delete j.draggingItem;j.draggingInitialStartPosition+d<0&&(d=-j.draggingInitialStartPosition);if(j.dragType=="Start"||j.dragType=="StartOnly"){var e,n;j.dragType!="StartOnly"&&(e=N(g.start,g.finish,l,D(g)));n=N(g.start,g.completedFinish,l,D(g));d=P(pa(Ia(j.draggingInitialStartPosition+d,l),l),l,true,g.isMilestone,D(g));if(j.dragType==
  "StartOnly"&&d>g.finish)d=g.finish;g.start=d;g.preferredStart=g.start;A(g,"start",true,false);if(j.dragType!="StartOnly"){if(g.isMilestone){g.finish=g.start;A(g,"finish",false,false);g.completedFinish=g.start}else{g.finish=Q(g.start,e,l,D(g));A(g,"finish",false,false);g.completedFinish=Q(g.start,n,l,D(g))}A(g,"completedFinish",false,false);if(DlhSoft.Controls.ToolTip&&l.useUpdatingToolTips&&!b){t=j.toolTip;t.setContent(l.dateTimeFormatter(x(g.start))+" \u2013 "+l.dateTimeFormatter(x(g.finish)));t.setHorizontalPosition(t.originalX+
  (I(g.start,l)-j.draggingInitialStartPosition))}}else{if(g.finish<g.start){g.finish=g.start;A(g,"finish",false,false)}if(g.completedFinish<g.start||n<=0){g.completedFinish=g.start;A(g,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&l.useUpdatingToolTips&&!b){t=j.toolTip;t.setContent(l.dateTimeFormatter(x(g.start))+" \u2013");t.setHorizontalPosition(t.originalX+(I(g.start,l)-j.draggingInitialStartPosition))}}Wa(g,k,j.chartContent,l)}else if(j.dragType=="Finish"){e=P(pa(Ia(j.draggingInitialFinishPosition+
  d,l),l),l,g.isMilestone,true,D(g));if(e<g.start)e=g.start;if(e.valueOf()!=g.finish.valueOf()){g.finish=e;A(g,"finish",true,false)}if(g.completedFinish>e){g.completedFinish=e;A(g,"completedFinish",false,false)}if(DlhSoft.Controls.ToolTip&&l.useUpdatingToolTips&&!b){t=j.toolTip;t.setContent("\u2013 "+l.dateTimeFormatter(x(g.finish)));t.setHorizontalPosition(t.originalX+(I(g.finish,l)-j.draggingInitialFinishPosition))}Wa(g,k,j.chartContent,l)}else if(j.dragType=="CompletedFinish"){e=P(pa(Ia(j.draggingInitialCompletedFinishPosition+
  d,l),l),l,g.isMilestone,true,D(g));if(e<g.start)e=g.start;if(e>g.finish)e=g.finish;if(e.valueOf()!=g.completedFinish.valueOf()){g.completedFinish=e;A(g,"completedFinish",true,false)}if(DlhSoft.Controls.ToolTip&&l.useUpdatingToolTips&&!b){t=j.toolTip;e=fb(g.start,g.completedFinish,g.finish,l,D(g));if(!isNaN(e)){t.setContent(Math.round(e*1E4)/100+"%");t.setHorizontalPosition(t.originalX+(I(g.completedFinish,l)-j.draggingInitialCompletedFinishPosition))}}Wa(g,k,j.chartContent,l)}j.draggingItem=g;j.draggingPerformed=
  true}};j.addEventListener("mousemove",u(j,j,"mousemove",function(a){v(a)},true),true);j.addEventListener("touchmove",u(j,j,"touchmove",function(a){v(a.touches[0],true)},true),true);g.touchMoveHandler=function(a){v(a.touches[0],true)};var s=function(){if(!(typeof j.draggingItem===c||j.draggingItem!=g||j.dragType!="Start"&&j.dragType!="StartOnly"&&j.dragType!="Finish"&&j.dragType!="CompletedFinish")){delete j.isDuringTimeDragOperation;var a=j.draggingItem;j.style.cursor="default";if(j.draggingPerformed){if(j.dragType==
  "Start"||j.dragType=="StartOnly"){A(a,"start",true,true);A(a,"finish",false,true);A(a,"completedFinish",false,true)}else if(j.dragType=="Finish"){A(a,"finish",true,true);A(a,"completedFinish",false,true)}else j.dragType=="CompletedFinish"&&A(a,"completedFinish",true,true);delete j.draggingPerformed}delete j.draggingItem}};document.addEventListener("mouseup",u(j,document,"mouseup",function(a){a.button==0&&s()},true),true);document.addEventListener("touchend",u(j,document,"touchend",function(){s()},
  true),true);g.touchEndHandler=function(){s()};j.draggableItems.push(g)}},eb=function(a,e,d,b,g,f,h,n,k,j){function l(d,e){delete k.cancelDrag;k.draggingItem=b;k.dragType="Dependency";k.dragDependencyType="Finish";k.style.cursor=a.style.cursor;k.draggingInitialX=d.clientX;k.draggingInitialY=d.clientY;k.draggingInitialRightPosition=f;k.draggingInitialTopPosition=g;k.draggingInitialFinishPosition=f;k.draggingInitialThumbPosition=g;if(DlhSoft.Controls.ToolTip&&j.useUpdatingToolTips&&!e){(toolTip=DlhSoft.Controls.ToolTip.get(a))||
  (toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,a,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+j.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+
  " \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;k.toolTip=toolTip}}var w=b.ganttChartView.ownerDocument;a.addEventListener("mousedown",u(k,a,"mousedown",function(a){if(a.button==0){l(a);a.preventDefault()}},true),true);a.addEventListener("touchstart",u(k,a,"touchstart",function(a){l(a.touches[0],true);a.preventDefault()},true),true);if(e!=null){var t=function(d,c){delete k.cancelDrag;k.draggingItem=b;k.dragType="Dependency";
  k.dragDependencyType="Start";k.style.cursor=a.style.cursor;k.draggingInitialX=d.clientX;k.draggingInitialY=d.clientY;k.draggingInitialRightPosition=h;k.draggingInitialTopPosition=g;k.draggingInitialFinishPosition=h;k.draggingInitialThumbPosition=g;d.preventDefault();if(DlhSoft.Controls.ToolTip&&j.useUpdatingToolTips&&!c){(toolTip=DlhSoft.Controls.ToolTip.get(e))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,e,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+
  j.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));toolTip.setContent(b.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+16,toolTip.y-8);toolTip.originalX=toolTip.x;toolTip.originalY=toolTip.y;k.toolTip=toolTip}};e.addEventListener("mousedown",u(k,e,"mousedown",function(a){if(a.button==
  0){t(a);a.preventDefault()}},true),true);e.addEventListener("touchstart",u(k,e,"touchstart",function(a){t(a.touches[0],true);a.preventDefault()},true),true)}a.addEventListener("mouseover",u(k,a,"mouseover",function(){if(typeof k.temporaryHoveringThumb!==c){var b=k.temporaryHoveringThumb;delete k.temporaryHoveringThumb;if(typeof b.originalStyle===c)return;b.setAttribute("style",b.originalStyle);delete b.originalStyle}if(typeof k.temporaryDependencyLine===c){a.mouseOver=true;k.temporaryHoveringThumb=
  a;a.originalStyle=a.getAttribute("style");typeof j.dependencyPointerClass!==c&&a.setAttribute("class",j.dependencyPointerClass);typeof j.dependencyPointerStyle!==c&&a.setAttribute("style",j.dependencyPointerStyle);a.style.cursor="pointer"}},true),true);e!=null&&e.addEventListener("mouseover",u(k,e,"mouseover",function(){if(typeof k.temporaryHoveringThumb!==c){var a=k.temporaryHoveringThumb;delete k.temporaryHoveringThumb;if(typeof a.originalStyle===c)return;a.setAttribute("style",a.originalStyle);
  delete a.originalStyle}if(typeof k.temporaryDependencyLine===c){e.mouseOver=true;k.temporaryHoveringThumb=e;e.originalStyle=e.getAttribute("style");typeof j.dependencyPointerClass!==c&&e.setAttribute("class",j.dependencyPointerClass);typeof j.dependencyPointerStyle!==c&&e.setAttribute("style",j.dependencyPointerStyle);e.style.cursor="pointer"}},true),true);a.addEventListener("mouseout",u(k,a,"mouseout",function(){delete a.mouseOver;setTimeout(function(){if(!(typeof a.originalStyle===c||a.mouseOver)){a.setAttribute("style",
  a.originalStyle);delete a.originalStyle}},250)},true),true);e!=null&&e.addEventListener("mouseout",u(k,e,"mouseout",function(){delete e.mouseOver;setTimeout(function(){if(!(typeof e.originalStyle===c||e.mouseOver)){e.setAttribute("style",e.originalStyle);delete e.originalStyle}},250)},true),true);if(typeof k.draggableDependencyItems===c)k.draggableDependencyItems=[];for(var y=false,p=0;p<k.draggableDependencyItems.length;p++)if(k.draggableDependencyItems[p]==b){y=true;break}if(!y){var r=function(a,
  e){if(!(typeof k.draggingItem===c||k.draggingItem!=b||k.dragType!="Dependency")){var f=a.clientX-k.draggingInitialX,g=a.clientY-k.draggingInitialY;kc(a.clientX,k);lc(a.clientY,k);delete k.draggingItem;k.draggingInitialFinishPosition+f<0&&(f=-k.draggingInitialFinishPosition);if(typeof k.temporaryDependencyLine!==c){try{d.removeChild(k.temporaryDependencyLine)}catch(l){}delete k.temporaryDependencyLine}if(k.cancelDrag){delete k.cancelDrag;delete k.draggingItem;k.style.cursor="default"}else{var h=w.createElementNS("http://www.w3.org/2000/svg",
  "line");h.setAttribute("x1",k.draggingInitialRightPosition);h.setAttribute("y1",k.draggingInitialTopPosition);h.setAttribute("x2",k.draggingInitialFinishPosition+f);h.setAttribute("y2",k.draggingInitialThumbPosition+g);typeof j.temporaryDependencyLineClass!==c&&h.setAttribute("class",j.temporaryDependencyLineClass);typeof j.temporaryDependencyLineStyle!==c&&h.setAttribute("style",j.temporaryDependencyLineStyle);k.temporaryDependencyLine=h;d.appendChild(h);k.draggingItem=b;if(DlhSoft.Controls.ToolTip&&
  j.useUpdatingToolTips&&!e){toolTip=k.toolTip;for(var t=Math.floor((b.itemTop+k.draggingInitialThumbPosition+g)/j.itemHeight),h=null,r=0,y=0;y<n.length;y++){var p=n[y];if(p.isVisible&&!(typeof p.isHidden!==c&&p.isHidden)&&typeof p.displayRowIndex===c){if(r==t){h=p;break}r++}}t="Start";if(h!=null){r=k.draggingInitialFinishPosition+f;y=I(h.start,j);p=I(h.finish,j);if(h.isMilestone||h.hasChildren&&(typeof h.isSummaryEnabled===c||h.isSummaryEnabled)){y=y-j.itemHeight/2;p=p+j.itemHeight/2}p<y+4&&(p=y+4);
  if(r<y||r>p||qb(h,b)||Ba(h,b)||Ba(b,h))h=null;if(h!=null&&(typeof j.allowCreatingToFinishDependencies===c||j.allowCreatingToFinishDependencies)&&!h.isMilestone&&r>y+(p-y)*3/4)t="Finish"}toolTip.setContent(b.content+" \u2013"+(h!=null?" "+h.content+(t!="Finish"?"":" \u2022"):""));toolTip.setPosition(toolTip.originalX+f,toolTip.originalY+g)}}}};k.addEventListener("mousemove",u(k,k,"mousemove",function(a){r(a)},true),true);k.addEventListener("touchmove",u(k,k,"touchmove",function(a){r(a.touches[0],true)},
  true),true);var o=function(a){if(!(typeof k.draggingItem===c||k.draggingItem!=b||k.dragType!="Dependency")){if(typeof k.temporaryDependencyLine!==c){try{d.removeChild(k.temporaryDependencyLine)}catch(e){}delete k.temporaryDependencyLine}for(var f=Math.floor((b.itemTop+k.draggingInitialThumbPosition+(a.clientY-k.draggingInitialY))/j.itemHeight),g=null,l=0,h=0;h<n.length;h++){var w=n[h];if(w.isVisible&&!(typeof w.isHidden!==c&&w.isHidden)&&typeof w.displayRowIndex===c){if(l==f){g=w;break}l++}}if(g!=
  null){a=k.draggingInitialFinishPosition+(a.clientX-k.draggingInitialX);f=I(g.start,j);l=I(g.finish,j);if(g.isMilestone||g.hasChildren&&(typeof g.isSummaryEnabled===c||g.isSummaryEnabled)){f=f-j.itemHeight/2;l=l+j.itemHeight/2}l<f+4&&(l=f+4);if(a>=f&&a<=l){a=g==null||typeof j.allowCreatingToFinishDependencies!==c&&!j.allowCreatingToFinishDependencies||g.isMilestone||a<=f+(l-f)*3/4?"Start":"Finish";if(!qb(g,b)&&!Ba(g,b)&&!Ba(b,g)&&(!j.alwaysHandleInvalidDependencies||!Fa(b,g))){delete b.successors;
  if(typeof g.predecessors===c)g.predecessors=[];f={item:b};if(k.dragDependencyType!="Start"){if(a=="Finish")f.dependencyType="FF"}else f.dependencyType=a!="Finish"?"SS":"SF";g.predecessors.push(f);A(g,"predecessors",true,true);if(g.start<b.finish&&!j.areTaskDependencyConstraintsEnabled&&!j.areTaskDependencyConstraintsDisabledWhenDropping){var t,r;if(!g.isMilestone&&(!g.hasChildren||!(typeof g.isSummaryEnabled===c||g.isSummaryEnabled))){t=N(g.start,g.finish,j,D(g));r=N(g.start,g.completedFinish,j,D(g))}if((!g.hasChildren||
  !(typeof g.isSummaryEnabled===c||g.isSummaryEnabled))&&a=="Start"){g.start=P(pa(k.dragDependencyType!="Start"?b.finish:b.start,j),j,true,g.isMilestone,D(b));A(g,"start",false,true);if(g.isMilestone){g.finish=g.start;A(g,"finish",false,true);g.completedFinish=g.start}else{g.finish=Q(g.start,t,j,D(g));A(g,"finish",false,true);g.completedFinish=Q(g.start,r,j,D(g))}A(g,"completedFinish",false,true)}}Wa(g,n,k.chartContent,j);Wa(b,n,k.chartContent,j)}else if(j.invalidPredecessorDetectionHandler){f={item:b};
  if(k.dragDependencyType!="Start"){if(a=="Finish")f.dependencyType="FF"}else f.dependencyType=a!="Finish"?"SS":"SF";j.invalidPredecessorDetectionHandler(f,g,b)}}}delete k.draggingItem;k.style.cursor="default"}};w.addEventListener("mouseup",u(k,w,"mouseup",function(a){a.button==0&&o(a)},true),true);w.addEventListener("touchend",u(k,w,"touchend",function(a){o(a.changedTouches[0])},true),true);k.draggableDependencyItems.push(b)}},kc=function(a,e){if(typeof e.draggingItem!==c){var d=new Date;if(!e.lastXDraggingTime||
  !(d>e.lastXDraggingTime&&d-e.lastXDraggingTime<200)){e.lastXDraggingTime=d;var d=e,b=0;if(d.offsetParent){do{b=b+d.offsetLeft;d=d.offsetParent}while(d)}a=a-b;if(a<e.gridContentContainer.offsetWidth+24){d=e.chartContentContainer.scrollLeft;e.chartContentContainer.scrollLeft=e.chartContentContainer.scrollLeft-20;d=d-e.chartContentContainer.scrollLeft;if(typeof e.draggingInitialStartPosition!==c)e.draggingInitialStartPosition=e.draggingInitialStartPosition-d;if(typeof e.draggingInitialFinishPosition!==
  c)e.draggingInitialFinishPosition=e.draggingInitialFinishPosition-d;if(typeof e.draggingInitialCompletedFinishPosition!==c)e.draggingInitialCompletedFinishPosition=e.draggingInitialCompletedFinishPosition-d}else if(a>=e.gridContentContainer.offsetWidth+e.chartContentContainer.clientWidth-24){d=e.chartContentContainer.scrollLeft;e.chartContentContainer.scrollLeft=e.chartContentContainer.scrollLeft+20;d=e.chartContentContainer.scrollLeft-d;if(typeof e.draggingInitialStartPosition!==c)e.draggingInitialStartPosition=
  e.draggingInitialStartPosition+d;if(typeof e.draggingInitialFinishPosition!==c)e.draggingInitialFinishPosition=e.draggingInitialFinishPosition+d;if(typeof e.draggingInitialCompletedFinishPosition!==c)e.draggingInitialCompletedFinishPosition=e.draggingInitialCompletedFinishPosition+d}}}},Wc=function(a){var e=0;if(a.offsetParent){do{e=e+a.offsetTop;a=a.offsetParent}while(a)}return e},lc=function(a,e){if(typeof e.draggingItem!==c){var d=new Date;if(!e.lastYDraggingTime||!(d>e.lastYDraggingTime&&d-e.lastYDraggingTime<
  200)){e.lastYDraggingTime=d;var a=a-Wc(e),b,g;if(a<e.chartHeaderContainer.clientHeight+24){b=e.chartContentContainer.scrollTop;e.chartContentContainer.scrollTop=e.chartContentContainer.scrollTop-20;if(typeof e.isDuringVerticalScrolling===c){e.isDuringVerticalScrolling=true;setTimeout(function(){g=b-e.chartContentContainer.scrollTop;e.draggingInitialThumbPosition=e.draggingInitialThumbPosition-g;delete e.isDuringVerticalScrolling},0)}}else if(a>=e.chartHeaderContainer.clientHeight+e.chartContentContainer.clientHeight-
  24){b=e.chartContentContainer.scrollTop;e.chartContentContainer.scrollTop=e.chartContentContainer.scrollTop+20;if(typeof e.isDuringVerticalScrolling===c){e.isDuringVerticalScrolling=true;setTimeout(function(){g=e.chartContentContainer.scrollTop-b;e.draggingInitialThumbPosition=e.draggingInitialThumbPosition+g;delete e.isDuringVerticalScrolling},0)}}}}},Wa=function(a,e,d,b){fa(a.chartItem,a,b);qa(e,a);setTimeout(function(){if(typeof a.gridItem!==c){if(typeof a.completedInput!==c){var g=a.completedInput;
  typeof g.changeEventListener!==c&&g.removeEventListener("change",g.changeEventListener,true);delete a.completedInput}Da(a.gridItem,a,e,b.columns,d,b.toggleButtonAreaWidth,b)}for(g=a.parent;g!=null;){bb(g,false);a=g;fa(a.chartItem,a,b);qa(e,a);typeof a.gridItem!==c&&Da(a.gridItem,a,e,b.columns,d,b.toggleButtonAreaWidth,b);g=a.parent}},0)},mc=function(a){var e=a.itemTop-a.ganttChartView.chartContentContainer.scrollTop;if(e<0)a.ganttChartView.chartContentContainer.scrollTop=a.itemTop;else if(e>a.ganttChartView.chartContentContainer.clientHeight-
  a.ganttChartView.settings.itemHeight)a.ganttChartView.chartContentContainer.scrollTop=a.itemTop-(a.ganttChartView.chartContentContainer.clientHeight-a.ganttChartView.settings.itemHeight)},Jc=function(a,e,d,b,g,f,h,n,k,j,l,w,t,y){var p,r;e.addEventListener("scroll",u(a,e,"scroll",function(){if(h.scrollTop!=e.scrollTop&&!r){p=true;setTimeout(function(){h.scrollTop=e.scrollTop;setTimeout(function(){p=false},100)},200)}if(b.scrollLeft!=e.scrollLeft)b.scrollLeft=e.scrollLeft},true),true);gb(e,d,g,y);typeof a.updateGridHeaderTimer!==
  c&&clearInterval(a.updateGridHeaderTimer);a.updateGridHeaderTimer=setInterval(function(){try{gb(e,d,g,y)}catch(b){try{clearInterval(a.updateGridHeaderTimer)}catch(c){}}},100);h.addEventListener("scroll",u(a,h,"scroll",function(){if(e.scrollTop!=h.scrollTop&&!p){r=true;setTimeout(function(){e.scrollTop=h.scrollTop;setTimeout(function(){r=false},100)},200)}if(n.scrollLeft!=h.scrollLeft)n.scrollLeft=h.scrollLeft;wa(t,h,y);Qa(t,l,y);y.displayedTime=Ia(h.scrollLeft,y);(typeof a.isDuringScrollToDateTime===
  c||!a.isDuringScrollToDateTime)&&typeof y.displayedTimeChangeHandler!==c&&setTimeout(function(){y.displayedTimeChangeHandler(y.displayedTime)},0);typeof a.isDuringScrollToDateTime!==c&&delete a.isDuringScrollToDateTime},true),true);setTimeout(function(){if(n.scrollLeft!=h.scrollLeft)n.scrollLeft=h.scrollLeft;wa(t,h,y)},1);gb(h,k,j,y);typeof a.updateChartHeaderTimer!==c&&clearInterval(a.updateChartHeaderTimer);a.updateChartHeaderTimer=setInterval(function(){try{gb(h,k,j,y)}catch(b){try{clearInterval(a.updateChartHeaderTimer)}catch(d){}}},
  100);window.addEventListener("mousewheel",u(a,window,"mousewheel",function(){try{a.cancelDrag=true}catch(b){}},true),true)},gb=function(a,e,d,b){setTimeout(function(){try{var c=e.clientWidth-a.clientWidth;c<0&&(c=0);var f=c+"px";if(d.style.width!=f){d.style.width=f;if(c>0){d.style.boxSizing="border-box";d.style.MozBoxSizing="border-box";d.style.border="solid 1px "+b.border;d.style.borderTop="none";d.style.borderRight="none"}else{d.style.border="";d.style.borderTop="";d.style.borderRight="";d.style.boxSizing=
  "";d.style.MozBoxSizing=""}}}catch(h){}},0)},Ha=function(a,e,d){if(d.isSplitterEnabled){a.style.height=e.clientHeight+"px";a.style.left=Math.max(0,e.offsetWidth-1)+"px"}},wa=function(a,e,d){if(!(typeof e.isInitializing!==c&&e.isInitializing)&&d.isVirtualizing)for(var b=e.scrollTop-d.itemHeight,e=b+e.clientHeight+2*d.itemHeight,g=0;g<a.length;g++){var f=a[g];if(!f.isPart)if(f.scheduleChartItem&&f.scheduleChartItem!=f){if(f.itemTop!=f.scheduleChartItem.itemTop||f.isVirtuallyVisible!=f.scheduleChartItem.isVirtuallyVisible){f.itemTop=
  f.scheduleChartItem.itemTop;f.isVirtuallyVisible=f.scheduleChartItem.isVirtuallyVisible;if(f.isVirtuallyVisible){fa(f.chartItem,f,d);f.chartItem.setAttribute("transform","translate(0, "+f.itemTop+")");Ea(f,f.itemTop)}}}else if(typeof f.isVirtuallyVisible===c&&(typeof f.isVisible===c||f.isVisible)&&!(typeof f.isHidden!==c&&f.isHidden)&&typeof f.itemTop!==c&&f.itemTop>=b&&f.itemTop<e){f.isVirtuallyVisible=true;A(f,"isVirtuallyVisible",false,true);typeof f.gridItem!==c&&Da(f.gridItem,f,a,d.columns,f.ganttChartView.chartContent,
  d.toggleButtonAreaWidth,d);fa(f.chartItem,f,d);f.chartItem.setAttribute("transform","translate(0, "+f.itemTop+")");Ea(f,f.itemTop)}else typeof f.isVirtuallyVisible!==c&&((typeof f.isVisible===c||f.isVisible)&&!(typeof f.isHidden!==c&&f.isHidden)&&typeof f.itemTop!==c&&(f.itemTop<b||f.itemTop>=e))&&delete f.isVirtuallyVisible}},Gc=function(a,e){for(var d=a.childNodes.length;d-- >0;)a.removeChild(a.childNodes[d]);a.appendChild(e)},Ab=function(a,e,d,b){var g=b.indexOf(a);if(!(g<0||e<0||e==g||e>=b.length)){b.splice(g,
  1);b.splice(e,0,a);nc(b);L(d);typeof d.settings.itemMoveHandler!==c&&d.settings.itemMoveHandler(a,g,e)}},hb=function(a,e,d,b,g){if(!(a<0||d<0||d==a||d>g.length-e)){var f=[],h;for(h=a;h<a+e;h++)f.push(g[h]);g.splice(a,e);for(h=0;h<f.length;h++)g.splice(d+h,0,f[h]);nc(g);L(b);if(typeof b.settings.itemMoveHandler!==c)for(h=0;h<f.length;h++)b.settings.itemMoveHandler(f[h],a+h,d+h)}},nc=function(a){for(var e=0,d=0;d<a.length;d++){var b=a[d];if(b.indentation>e){b.indentation=e;A(b,"indentation",false,true)}e=
  b.indentation+1}},Xc=function(a,e,d,b,g,f,h,n,k,j){function l(d){delete b.cancelDrag;b.draggingItem=e;b.dragType="Ordering";b.style.cursor=a.style.cursor;b.draggingInitialY=d.clientY;b.draggingInitialThumbPosition=0;b.resetChartAreaDefinitions()}a.addEventListener("mousedown",u(b,a,"mousedown",function(a){if(a.button==0){l(a);a.preventDefault()}},true),true);a.addEventListener("touchstart",u(b,a,"touchstart",function(a){l(a.touches[0]);a.preventDefault()},true),true);if(typeof b.draggableOrderingItems===
  c)b.draggableOrderingItems=[];for(var w=false,t=0;t<b.draggableOrderingItems.length;t++)if(b.draggableOrderingItems[t]==e){w=true;break}if(!w){var p=function(a){if(!(typeof b.draggingItem===c||b.draggingItem!=e||b.dragType!="Ordering")){if(typeof b.temporaryHoveredGridItemSelectionContainer!==c){b.temporaryHoveredGridItemSelectionContainer.setAttribute("class",b.temporaryHoveredGridItemClass);b.temporaryHoveredGridItemSelectionContainer.setAttribute("style",b.temporaryHoveredGridItemStyle);delete b.temporaryHoveredGridItemSelectionContainer;
  delete b.temporaryHoveredGridItemClass;delete b.temporaryHoveredGridItemStyle}var l=a.clientY-b.draggingInitialY;lc(a.clientY,b);delete b.draggingItem;if(b.cancelDrag){z(e,g);delete b.cancelDrag;delete b.draggingItem;b.style.cursor="default"}else{for(var a=Math.floor((e.itemTop+b.draggingInitialThumbPosition+l)/g.itemHeight),l=null,w=0,t=0;t<d.length;t++){var p=d[t];if(p.isVisible&&!(typeof p.isHidden!==c&&p.isHidden)&&typeof p.displayRowIndex===c){if(w==a){l=p;break}w++}}if(l!=null&&l!=e&&l.gridItemSelectionContainer!=
  null){b.temporaryHoveredGridItemSelectionContainer=l.gridItemSelectionContainer;b.temporaryHoveredGridItemClass=l.gridItemSelectionContainer.getAttribute("class");b.temporaryHoveredGridItemStyle=l.gridItemSelectionContainer.getAttribute("style");typeof f===c||f(a,l)?typeof h!==c?l.gridItemSelectionContainer.setAttribute("class",h):typeof n!==c&&l.gridItemSelectionContainer.setAttribute("style",n):typeof k!==c?l.gridItemSelectionContainer.setAttribute("class",k):typeof j!==c&&l.gridItemSelectionContainer.setAttribute("style",
  j)}b.draggingItem=e}}};b.addEventListener("mousemove",u(b,b,"mousemove",function(a){p(a)},true),true);b.addEventListener("touchmove",u(b,b,"touchmove",function(a){p(a.touches[0])},true),true);var o=function(a){if(!(typeof b.draggingItem===c||b.draggingItem!=e||b.dragType!="Ordering")){if(typeof b.temporaryHoveredGridItemSelectionContainer!==c){b.temporaryHoveredGridItemSelectionContainer.setAttribute("class",b.temporaryHoveredGridItemClass);b.temporaryHoveredGridItemSelectionContainer.setAttribute("style",
  b.temporaryHoveredGridItemStyle);delete b.temporaryHoveredGridItemSelectionContainer;delete b.temporaryHoveredGridItemClass;delete b.temporaryHoveredGridItemStyle}for(var a=Math.floor((e.itemTop+b.draggingInitialThumbPosition+(a.clientY-b.draggingInitialY))/g.itemHeight),n=null,k=0,j=0;j<d.length;j++){var l=d[j];if(l.isVisible&&!(typeof l.isHidden!==c&&l.isHidden)&&typeof l.displayRowIndex===c){if(k==a){n=l;break}k++}}n!=null&&(typeof f===c||f(a,n))&&b.moveItemHierarchy(b.draggingItem,n.index);setTimeout(function(){z(e,
  g);mc(e)},0);b.resetChartAreaDefinitions();delete b.draggingItem;b.style.cursor="default"}};document.addEventListener("mouseup",u(b,document,"mouseup",function(a){a.button==0&&o(a)},true),true);document.addEventListener("touchend",u(b,document,"touchend",function(a){o(a.changedTouches[0])},true),true);b.draggableOrderingItems.push(e)}},Yc=function(a,e){for(var d in e)d.indexOf("custom")!=0&&d.indexOf("description")!=0||typeof a[d]===c&&(a[d]=e[d])},oc=function(a,e,d,b,g,f,h,n,k,j,l,w,t,p,o,r){var m,
  v=[],s;if(typeof b!==c)for(m=0;m<b.length;m++){s=r.columns[b[m]];v.push({isTreeView:s.isTreeView,header:s.header,width:s.width,headerClass:s.headerClass,headerStyle:s.headerStyle,cellClass:s.cellClass,cellStyle:s.cellStyle,cellTemplate:typeof s.exportCellTemplate!==c?s.exportCellTemplate:s.cellTemplate})}else for(m=0;m<r.columns.length;m++){s=r.columns[m];s.isSelection||v.push({isTreeView:s.isTreeView,header:s.header,width:s.width,headerClass:s.headerClass,headerStyle:s.headerStyle,cellClass:s.cellClass,
  cellStyle:s.cellStyle,cellTemplate:typeof s.exportCellTemplate!==c?s.exportCellTemplate:s.cellTemplate})}if(typeof d===c)d=r.isGridVisible;m=d?kb(v)+1:0;if(typeof g!==c){if(typeof h===c||!h)g=new Date(g.valueOf()-g.getTimezoneOffset()*6E4)}else g=r.timelineStart;if(typeof f!==c){if(typeof h===c||!h)f=new Date(f.valueOf()-f.getTimezoneOffset()*6E4)}else f=r.timelineFinish;g={isExport:true,isReadOnly:true,selectionMode:"None",isVirtualizing:false,isGridVisible:d,isSplitterEnabled:false,gridWidth:m+
  "px",columns:v,allowUserToResizeColumns:false,isGridRowClickTimeScrollingEnabled:false,isMouseWheelZoomEnabled:false,timelineStart:g,timelineFinish:f,hourWidth:typeof n!==c?n:r.hourWidth,displayedTime:typeof g!==c?g:r.timelineStart,currentTime:r.currentTime,isTaskToolTipVisible:false,isDependencyToolTipVisible:false,containerClass:r.containerClass,containerStyle:r.containerStyle,border:r.border,theme:r.theme,headerBackground:r.headerBackground,headerHeight:r.headerHeight,itemHeight:r.itemHeight,itemClass:r.itemClass,
  itemStyle:r.itemStyle,standardItemClass:r.standardItemClass,summaryItemClass:r.summaryItemClass,milestoneItemClass:r.milestoneItemClass,standardItemStyle:r.standardItemStyle,summaryItemStyle:r.summaryItemStyle,milestoneItemStyle:r.milestoneItemStyle,indentationLevelWidth:r.indentationLevelWidth,toggleButtonClass:r.toggleButtonClass,toggleButtonStyle:r.toggleButtonStyle,scales:[],visibleWeekStart:r.visibleWeekStart,visibleWeekFinish:r.visibleWeekFinish,workingWeekStart:r.workingWeekStart,workingWeekFinish:r.workingWeekFinish,
  visibleDayStart:r.visibleDayStart,visibleDayFinish:r.visibleDayFinish,specialNonworkingDays:r.specialNonworkingDays,barMargin:r.barMargin,barHeight:r.barHeight,barCornerRadius:r.barCornerRadius,completedBarMargin:r.completedBarMargin,completedBarHeight:r.completedBarHeight,completedBarCornerRadius:r.completedBarCornerRadius,standardBarClass:r.standardBarClass,summaryBarClass:r.summaryBarClass,milestoneBarClass:r.milestoneBarClass,standardBarStyle:r.standardBarStyle,summaryBarStyle:r.summaryBarStyle,
  milestoneBarStyle:r.milestoneBarStyle,standardCompletedBarClass:r.standardCompletedBarClass,standardCompletedBarStyle:r.standardCompletedBarStyle,summaryCompletedBarClass:r.summaryCompletedBarClass,summaryCompletedBarStyle:r.summaryCompletedBarStyle,dependencyLineClass:r.dependencyLineClass,dependencyLineStyle:r.dependencyLineStyle,assignmentsClass:r.assignmentsClass,assignmentsStyle:r.assignmentsStyle,areTaskAssignmentsVisible:r.areTaskAssignmentsVisible,isTaskCompletedEffortVisible:r.isTaskCompletedEffortVisible,
  areTaskDependenciesVisible:r.areTaskDependenciesVisible,areDependencyConstraintsAppliedOnStartedTasks:r.areDependencyConstraintsAppliedOnMilestones,areDependencyConstraintsAppliedOnMilestones:r.areDependencyConstraintsAppliedOnMilestones,isBaselineVisible:r.isBaselineVisible,areStandardTaskLabelsVisible:r.areStandardTaskLabelsVisible,areSummaryTaskLabelsVisible:r.areSummaryTaskLabelsVisible,areMilestoneTaskLabelsVisible:r.areMilestoneTaskLabelsVisible,areResourceImagesVisibleAsAssignments:r.areResourceImagesVisibleAsAssignments,
  resourceImageUrls:r.resourceImageUrls,standardLabelColor:r.standardLabelColor,summaryLabelColor:r.summaryLabelColor,milestoneLabelColor:r.milestoneLabelColor,standardLabelClass:r.standardLabelClass,standardLabelStyle:r.standardLabelStyle,summaryLabelClass:r.summaryLabelClass,summaryLabelStyle:r.summaryLabelStyle,milestoneLabelClass:r.milestoneLabelClass,milestoneLabelStyle:r.milestoneLabelStyle,alternativeItemClass:r.alternativeItemClass,alternativeChartItemClass:r.alternativeChartItemClass,alternativeItemStyle:r.alternativeItemStyle,
  alternativeChartItemStyle:r.alternativeChartItemStyle,gridLines:r.gridLines,horizontalGridLines:r.horizontalGridLines,verticalGridLines:r.verticalGridLines,horizontalChartLines:r.horizontalChartLines,isIndividualItemNonworkingTimeHighlighted:r.isIndividualItemNonworkingTimeHighlighted,areTaskInterruptionsHighlighted:r.areTaskInterruptionsHighlighted,isBaselineVisible:r.isBaselineVisible,taskInitiationCost:r.taskInitiationCost,defaultResourceUsageCost:r.defaultResourceUsageCost,specificResourceUsageCosts:r.specificResourceUsageCosts,
  defaultResourceHourCost:r.defaultResourceHourCost,specificResourceHourCosts:r.specificResourceHourCosts,target:r.target,months:r.months,daysOfWeek:r.daysOfWeek,weekStartDay:r.weekStartDay,dateFormatter:r.dateFormatter,dateTimeFormatter:r.dateTimeFormatter,isRelativeToTimezone:r.isRelativeToTimezone,standardTaskTemplate:r.standardTaskTemplate,summaryTaskTemplate:r.summaryTaskTemplate,milestoneTaskTemplate:r.milestoneTaskTemplate,assignmentsTemplate:r.assignmentsTemplate,dependencyLineTemplate:r.dependencyLineTemplate,
  styleDefinitionTemplate:r.styleDefinitionTemplate};g.timelineStart=xa(g.timelineStart,g.weekStartDay);g.timelineFinish=mb(g.timelineFinish,g.weekStartDay);f=I(g.timelineFinish,g);g.chartWidth=f+"px";var q=m+f+2+(d?1:0);for(m=0;m<r.scales.length;m++){d=r.scales[m];g.scales.push({scaleType:d.scaleType,isHeaderVisible:d.isHeaderVisible,headerHeight:d.headerHeight,headerTextFormat:d.headerTextFormat,headerClass:d.headerClass,headerStyle:d.headerStyle,isHighlightingVisible:d.isHighlightingVisible,highlightingClass:d.highlightingClass,
  highlightingStyle:d.highlightingStyle,isSeparatorVisible:d.isSeparatorVisible,separatorClass:d.separatorClass,separatorStyle:d.separatorStyle,intervals:d.intervals})}var x,F,z=false;if(l!=null&&typeof l.createElement!==c)x=l;else{if(l!=null&&typeof l.focus!==c)F=l;else{F=window.open("",l!=null?l:"_blank",typeof w!==c&&w&&(typeof p===c||p)?"width=800,height=480,location=no,menubar=no,toolbar=no,status=no,scrollbars=yes":"");z=true}x=F.document;try{var A=document.head.getElementsByTagName("link");for(m=
  0;m<A.length;m++){var u=A[m],E=x.adoptNode(u.cloneNode(true));E.href=u.href;x.head.appendChild(E)}}catch(B){}}x.title=typeof a!==c?a:"Exported chart"+(typeof w!==c&&w?" (printable)":"");typeof k===c&&(k=0);typeof j===c&&(j=o.length-1);a=[];for(m=A=0;m<o.length;m++){l=o[m];if(!(typeof l.displayRowIndex!==c&&(l.displayRowIndex<k||l.displayRowIndex>j)||typeof l.displayRowIndex===c&&(A++<k||A>j+1))){r={content:l.content,label:l.label,indentation:l.indentation,start:l.start,finish:l.finish,completedFinish:l.completedFinish,
  isMilestone:l.isMilestone,schedule:D(l),assignmentsContent:l.assignmentsContent,baselineStart:l.baselineStart,baselineFinish:l.baselineFinish,isBarVisible:l.isBarVisible,isRelativeToTimezone:l.isRelativeToTimezone,"class":l["class"],style:l.style,barClass:l.barClass,standardBarClass:l.standardBarClass,standardCompletedBarClass:l.standardCompletedBarClass,summaryBarClass:l.summaryBarClass,milestoneBarClass:l.milestoneBarClass,baselineBarClass:l.baselineBarClass,barStyle:l.barStyle,standardBarStyle:l.standardBarStyle,
  standardCompletedBarStyle:l.standardCompletedBarStyle,summaryBarStyle:l.summaryBarStyle,milestoneBarStyle:l.milestoneBarStyle,baselineBarStyle:l.baselineBarStyle,labelColor:l.labelColor,labelClass:l.labelClass,labelStyle:l.labelStyle,isSummaryEnabled:l.isSummaryEnabled,isParentSummarizationEnabled:l.isParentSummarizationEnabled,isHidden:l.isHidden,isExported:true,tag:l};if(typeof l.displayRowIndex!==c)r.displayRowIndex=l.displayRowIndex-k;Yc(r,l);a.push(r);l.exportItem=r}}for(m=0;m<o.length;m++){l=
  o[m];if(!(typeof l.displayRowIndex!==c&&(l.displayRowIndex<k||l.displayRowIndex>j))){r=l.exportItem;if(typeof l.predecessors!==c){r.predecessors=[];for(A=0;A<l.predecessors.length;A++){u=l.predecessors[A];typeof u.item.displayRowIndex!==c&&(u.item.displayRowIndex<k||u.item.displayRowIndex>j)||r.predecessors.push({item:u.item.exportItem,dependencyType:u.dependencyType,lag:u.lag,dependencyLineClass:u.dependencyLineClass,dependencyLineStyle:u.dependencyLineStyle})}}}}var C=x.createElement("p");C.innerHTML=
  typeof e!==c?e:"";x.body.appendChild(C);var G=x.createElement("div");G.setAttribute("style","width: "+q+"px");try{DlhSoft.Controls.GanttChartView.initialize(G,a,g,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")}catch(S){}setTimeout(function(){z&&x.body.setAttribute("style","margin: 0px");var a=x.createElement("div");a.appendChild(G);x.body.replaceChild(a,C);if(t){a.setAttribute("style","width: "+G.offsetHeight+
  "px; height: "+q+"px; overflow: hidden");a=Math.round((G.offsetWidth-G.offsetHeight)/2);G.setAttribute("style","width: "+q+"px; transform: rotate(90deg) translateX("+a+"px) translateY("+a+"px); -webkit-transform: rotate(90deg) translateX("+a+"px) translateY("+a+"px)")}x.close();if(typeof F!==void 0){F.focus();typeof w!==c&&w&&setTimeout(function(){F.print();(typeof p===c||p)&&setTimeout(function(){F.close()})})}},0)},pc=function(a){var e=ka;if(typeof a===c)return e;for(var d=0;d<a.length;d++){var b=
  a[d];if((!b.hasChildren||!(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))&&b.start<e)e=b.start}return new Date(e.valueOf())},Bb=function(a){var e=O;if(typeof a===c)return e;for(var d=0;d<a.length;d++){var b=a[d];if(!b.hasChildren||!(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))if(typeof b.isMilestone===c||!b.isMilestone){if(b.finish>e)e=b.finish}else if(b.start>e)e=b.start}return new Date(e.valueOf())},qc=function(a,e){for(var d=0,b=0;b<a.length;b++){var c=a[b];c.parent==null&&(d=d+ga(c,
  e))}return d},rc=function(a,e){for(var d=0,b=0;b<a.length;b++){var c=a[b];c.parent==null&&(d=d+za(c,e))}return d},sc=function(a,e){for(var d=[],b=0;b<e.length;b++){var g=e[b];if(!(g==a||typeof g.predecessors===c||g.predecessors.length==0))for(var f=0;f<g.predecessors.length;f++)if(g.predecessors[f].item==a){d.push(g);break}}return d},ib=function(a,e){for(var d=[],b=sc(a,e),g=0;g<b.length;g++){var f=b[g];if(!(typeof f.predecessors===c||f.predecessors.length==0))for(var h=0;h<f.predecessors.length;h++)f.predecessors[h].item==
  a&&d.push({successor:f,predecessor:f.predecessors[h]})}return d},jb=function(a,e,d,b,g){typeof e===c&&(e=0);g=g?g:Bb(d);if(a.finish>=g)return true;var f;if(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){var h=a.successorPredecessors?a.successorPredecessors:ib(a,d);for(f=0;f<h.length;f++){var n=h[f].successor;if(!b.areTaskDependencyConstraintsEnabled){for(var k=a,j=true;k;){if(Ba(k,n)){j=false;break}k=k.parent}if(!j)continue}k=h[f].predecessor;if(((typeof k.dependencyType===
  c||k.dependencyType==""||k.dependencyType=="FinishStart"||k.dependencyType=="FS")&&N(a.finish,n.start,b,D(a))<=(k.lag?k.lag:0)+e||(k.dependencyType=="StartStart"||k.dependencyType=="SS")&&N(a.start,n.start,b,D(a))<=(k.lag?k.lag:0)+e)&&jb(n,e,d,b,g))return true}}else{a=a.children;for(f=0;f<a.length;f++)if(jb(a[f],e,d,b,g))return true}return false},Zc=function(a,e,d,b){if(typeof e!==c){e=a.getNetworkDiagramItems(b,void 0,void 0,e);a=a.ownerDocument.createElement("div");DlhSoft.Controls.Pert.NetworkDiagramView.initialize(a,
  e,void 0,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");return a.getCriticalItems().filter(function(a){return a.tag}).map(function(a){return a.tag})}},Cb=function(a,e,d){for(var b=0;b<a.length;b++){var g=a[b];(!g.hasChildren||!(typeof g.isSummaryEnabled===c||g.isSummaryEnabled))&&(typeof g.predecessors!==c&&g.predecessors!=null&&g.predecessors.length>0)&&Aa(g,a,e,d)}},tc=function(a,e,d,b){var e=new Date(e.valueOf()-
  e.getTimezoneOffset()*6E4),e=sa(e,b,D(a)),d=ga(a,b),c=za(a,b);Db(a,e);$a(a,d,b);ab(a,c,b);Z(a)},uc=function(a,e){for(var d=0,b=ha(a),g=0;g<b.length;g++){var f=b[g],h=f.key,n;typeof e.specificResourceUsageCosts!==c&&(n=$(e.specificResourceUsageCosts,h))>=0?d=d+e.specificResourceUsageCosts[n].value*f.value:typeof e.defaultResourceUsageCost!==c&&(d=d+e.defaultResourceUsageCost*f.value);if(!a.hasChildren||!(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){var k=ga(a,e)/36E5;typeof e.specificResourceHourCosts!==
  c&&(n=$(e.specificResourceHourCosts,h))>=0?d=d+e.specificResourceHourCosts[n].value*k*f.value:typeof e.defaultResourceHourCost!==c&&(d=d+e.defaultResourceHourCost*k*f.value)}}return d},Fb=function(a,e){var d=typeof e.taskInitiationCost!==c?e.taskInitiationCost:0,d=d+uc(a,e);if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled))for(var b=0;b<a.children.length;b++)d=d+Eb(a.children[b],e);return d},Eb=function(a,e){return(typeof a.executionCost!==c?a.executionCost:0)+Fb(a,e)},vc=function(a,
  e,d,b,g,f,h){if(typeof d!==c){typeof a===c&&(a=false);typeof e===c&&(e=new Date);typeof f===c&&(f=false);typeof h===c&&(h=false);Cb(d,b,g);var g=[],n=[],k,j,l,w=[];for(j=0;j<d.length;j++){k=d[j];if(!k.hasChildren||!(typeof k.isSummaryEnabled===c||k.isSummaryEnabled)){if(h){l=false;for(var t=k;t!=null;){if(typeof t.predecessors!==c&&t.predecessors.length>0){l=true;break}t=t.parent}if(!l)continue}g.push({key:k,value:$c(k)});var t=!f?ha(k):[],p=[];for(l=0;l<t.length;l++){var o=t[l];o.value>0&&p.push(o)}n.push({key:k,
  value:p});w.push(k)}}d=[];for(f=g.length;f>0;){h=[];for(j=0;j<g.length;j++){k=g[j].key;l=true;t=g[j].value;for(p=0;p<t.length;p++){o=t[p];if($(g,o)>=0&&h.indexOf(o)<0){l=false;break}}if(l){p=k;l=e;t=b;if(typeof p.minStart!==c&&l<p.minStart)l=p.minStart;if(a||!Ka(p))for(;p!=null;){if(typeof p.predecessors!==c)for(o=0;o<p.predecessors.length;o++){var r=p.predecessors[o];if(typeof r!==c){var m=r.dependencyType;typeof m===c&&(m="FinishStart");switch(m){case "":case "FinishStart":case "FS":r=Q(r.item.finish,
  typeof r.lag===c?0:r.lag,t,D(r.item));r>l&&(l=r);break;case "StartStart":case "SS":r=Q(r.item.start,typeof r.lag===c?0:r.lag,t,D(r.item));r>l&&(l=r)}}}for(p=p.parent;p!=null&&typeof p.isSummaryEnabled!==c&&!p.isSummaryEnabled;)p=p.parent}t=l;l=$(n,k);var p=n[l].value,s;for(l=0;l<p.length;l++){s=p[l].key;o=p[l].value;m=$(d,s);if(m>=0){r=1;if(typeof b.resourceQuantities!==c){var v=$(b.resourceQuantities,s);if(v>=0)r=b.resourceQuantities[v].value}previousAllocations=d[m].value;for(m=0;m<previousAllocations.length;m++){s=
  previousAllocations[m].key;if(!(s+o<=r)){v=previousAllocations[m].value;v>t&&(t=v)}}}}if((a||!Ka(k))&&(t=sa(t,b,D(k)))!=k.start){l=ga(k,b);o=za(k,b);Db(k,t);$a(k,l,b);ab(k,o,b)}r=k.finish;for(l=0;l<p.length;l++){s=p[l].key;o=p[l].value;m=$(d,s);if(m<0){v=[];d.push({key:s,value:v})}else v=d[m].value;for(var x=[{key:o,value:r}],q,F,z,m=0;m<v.length;m++){s=v[m].key;var u=v[m].value;if(u>t){F=s+o;z=u<r?u:r;q=$(x,F);if(q<0)x.push({key:F,value:z});else if(z>x[F])x[q].value=z;u<r?x.push({key:s+o,value:u}):
  x.push({key:s+o,value:r})}}for(o=0;o<x.length;o++){F=x[o].key;z=x[o].value;q=$(v,F);if(q<0)v.push({key:F,value:z});else if(z>v[q].value)v[q].value=z}}h.push(k)}}for(j=0;j<h.length;j++)g.splice($(g,h[j]),1);if(g.length==f)break;f=g.length}for(j=0;j<w.length;j++){k=w[j];A(k,"start",true,true);A(k,"finish",true,true);A(k,"completedFinish",true,true);Z(k)}}},$c=function(a){for(var e=[],a=xb(a),d=0;d<a.length;d++)wc(a[d],e);return e},wc=function(a,e){if(!a.hasChildren||!(typeof a.isSummaryEnabled===c||
  a.isSummaryEnabled))e.indexOf(a)<0&&e.push(a);else for(var d=0;d<a.children.length;d++)wc(a.children[d],e)},Ka=function(a){return!a.isMilestone&&a.completedFinish>a.start},ga=function(a,e){if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){for(var d=0,b=a.children,g=0;g<b.length;g++)d=d+ga(b[g],e);return d}return N(a.start,a.finish,e,D(a))},za=function(a,e){if(a.hasChildren&&(typeof a.isSummaryEnabled===c||a.isSummaryEnabled)){for(var d=0,b=a.children,g=0;g<b.length;g++)d=d+za(b[g],
  e);return d}return N(a.start,a.completedFinish,e,D(a))},$a=function(a,e,d){e=Q(a.start,e,d,D(a));a.finish=e;A(a,"finish",false,false);xc(a,false)},ab=function(a,e,d){a.completedFinish=Q(a.start,e,d,D(a));A(a,"completedFinish",false,false)},Db=function(a,e){a.start=e;a.preferredStart=e;A(a,"start",false,false);xc(a,false)},xc=function(a,e){for(var d=a.parent;d!=null;){bb(d,e);a=d;d=a.parent}},yc=function(a,e,d){typeof d===c&&(d=false);var b=a.parent,g=a.index;if(b==null){for(b=0;g-- >0;){a=e[g];a.indentation==
  0&&b++}return b+(!d?1:0)}return yc(b,e)+"."+(b.children.indexOf(a)+(!d?1:0))},ha=function(a){var e;a=a.assignmentsContent;if(typeof a===c)e=[];else{for(var a=a.split(","),d=[],b=0;b<a.length;b++){var g=Xa(a[b]),f=1,h=g.indexOf("["),n=g.lastIndexOf("]");if(h>=0&&n>=0){n=Xa(g.substr(h+1,n-h-1));g=Xa(g.substr(0,h));h=n.indexOf("%");h>=0&&(n=Xa(n.substr(0,h)));try{e=parseFloat(n);f=e/100}catch(k){f=1}}if(!(g.length<=0)){h=$(d,g);h<0?d.push({key:g,value:f}):d[h].value=d[h].value+f}}e=d}return e},zc=function(a){for(var e=
  [],a=ha(a),d=0;d<a.length;d++)e.push(a[d].key);return e},La=function(a,e){if(typeof e===c)return[];for(var d=[],b=0;b<e.length;b++){var g=e[b];if(!g.hasChildren||!(typeof g.isSummaryEnabled===c||g.isSummaryEnabled))for(var f=ha(g),h=0;h<f.length;h++){var n=f[h];if(n.key==a){d.push({key:g,value:n.value});break}}}return d},Na=function(a){if(typeof a===c)return[];for(var e=[],d=0;d<a.length;d++){var b=a[d];if(!b.hasChildren||!(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))for(var b=zc(b),g=0;g<
  b.length;g++){var f=b[g];e.indexOf(f)<0&&e.push(f)}}return e},Ac=function(a,e){for(var d=[],b=La(a,e),g=0;g<b.length;g++){var f=b[g],h=f.key;if(!h.hasChildren||!(typeof h.isSummaryEnabled===c||h.isSummaryEnabled))for(h=[{start:h.start,finish:h.finish}];h.length>0;){var n;n=h[0];h.splice(0,1);if(!(n.finish<=n.start))if(d.length==0)d.push({key:n,value:f.value});else{pc(e);for(var k=false,j=0;j<d.length;j++){var l=d[j].key,w=d[j].value;if(!(n.start>=l.finish))if(n.finish<=l.start){for(k=0;k<=j;k++)if(d[k].key.start>=
  n.start){d.splice(k,0,{key:n,value:f.value});break}k=true;break}else if(n.start<=l.start&&n.finish>=l.finish){d[j].value=w+f.value;n.start<l.start&&h.push({start:n.start,finish:l.start});n.finish>l.finish&&h.push({start:l.finish,finish:n.finish});k=true;break}else if(n.start>=l.start&&n.finish<=l.finish){d.splice(j,1);n.start>l.start&&d.splice(j++,0,{key:{start:l.start,finish:n.start},value:w});d.splice(j++,0,{key:n,value:w+f.value});n.finish<l.finish&&d.splice(j++,0,{key:{start:n.finish,finish:l.finish},
  value:w});k=true;break}else if(n.start>=l.start&&n.finish>=l.finish){d.splice(j,1);n.start>l.start&&d.splice(j++,0,{key:{start:l.start,finish:n.start},value:w});d.splice(j++,0,{key:{start:n.start,finish:l.finish},value:w+f.value});n.finish>l.finish&&h.push({start:l.finish,finish:n.finish});k=true;break}else if(n.start<=l.start&&n.finish<=l.finish){d.splice(j,1);n.start<l.start&&h.push({start:n.start,finish:l.start});d.splice(j++,0,{key:{start:l.start,finish:n.finish},value:w+f.value});n.finish<l.finish&&
  d.splice(j++,0,{key:{start:n.finish,finish:l.finish},value:w});k=true;break}}k||d.push({key:n,value:f.value})}}}return d},Gb=function(a,e,d){for(var b=0;b<a.length;b++){var c=a[b];if(c.key==e){e=c.value;if(e.indexOf(d)>=0)return true;for(b=0;b<e.length;b++)if(Gb(a,e[b],d))return true;break}}return false},Ga=function(a){var e=a.content;return a.parent==null?e:e+" ("+Ga(a.parent)+")"},Ya=function(a,e){return a==e?true:a.parent==null?false:Ya(a.parent,e)},Xa=function(a){return a.replace(/^\s*/,"").replace(/\s*$/,
  "")},$=function(a,e){for(var d=0;d<a.length;d++)if(a[d].key==e)return d;return-1},Bc=function(a){return typeof a!==c?new Date(a.valueOf()+a.getTimezoneOffset()*6E4):a},Cc=function(a){return typeof a!==c?new Date(a.valueOf()-a.getTimezoneOffset()*6E4):a},Dc=function(a,e,d){var b;for(b=0;b<e.length;b++)e[b].ganttChartView=a;for(b=0;b<e.length;b++){var g=e[b];if(typeof g.parts!==c){if(typeof g.isGroup===c){g.isGroup=true;g.isSummaryEnabled=false}H(g.parts,d);if(g.isGroup||typeof g.isBarVisible===c)g.isBarVisible=
  false;for(var f=0;f<g.parts.length;f++){var h=g.parts[f];h.ganttChartView=g.ganttChartView;h.ganttChartItem=g;h.isPart=true;h.isVirtuallyVisible=true;if(g.isGroup||typeof h.indentation===c)h.indentation=0;if(g.isGroup||typeof h.displayRowIndex===c)h.displayRowIndex=-1;h.isInternallyHidden=true;e.indexOf(h)>=0||e.splice(e.length,0,h)}}}a.items=e;a.settings=d;a.refresh=function(){L(a)};a.refreshItems=function(){Sa(e)};a.refreshGridItems=function(){for(var a=0;a<e.length;a++)Ra(e[a])};a.refreshChartItems=
  function(){for(var a=0;a<e.length;a++)oa(e[a])};a.refreshGridItem=Ra;a.refreshChartItem=oa;a.refreshItem=na;a.refreshPredecessorItems=ra;a.refreshItemGraph=Ja;a.refreshItemPath=Z;a.refreshItemNeighbourhood=function(b){Ta(b,e,a,d)};a.refreshCurrentTimeLine=function(){var b=a.chartHeader,c=a.chartContent,f=c.chartArea,g,h=[];for(g=f.childNodes.length;g-- >1;){var p=f.childNodes[g];p.tag!="Scale-Highlighting-CurrentTime"&&p.tag!="Scale-Separator-CurrentTime"&&h.push(p);f.removeChild(p)}lb(b,f,d.scales,
  d,true);for(g=h.length;g-- >0;)f.appendChild(h[g]);ua(c,va(e,d))};a.setCurrentTime=function(b){d.currentTime=b;a.refreshCurrentTimeLine()};a.updateCurrentTime=function(){var b=new Date,b=new Date(b.valueOf()-b.getTimezoneOffset()*6E4);a.setCurrentTime(b)};a.getCurrentItem=function(){return a.currentItem};a.getSelectedItem=function(){return a.selectedItem};a.getSelectedItems=function(){return a.selectedItems};a.selectItem=function(a){v(a,true,d.selectionMode)};a.unselectItem=function(a){v(a,false,
  d.selectionMode)};a.expandItem=function(a){ja(a,true,true)};a.collapseItem=function(a){ja(a,false,true)};a.scrollToItem=mc;a.scrollToBottom=function(){a.chartContentContainer.scrollTop=a.chartContent.clientHeight};a.scrollToDateTime=function(b){a.isDuringScrollToDateTime=true;a.chartContentContainer.scrollLeft=I(b,a.settings)};a.increaseTimelinePage=function(b){d.timelineStart=new Date(d.timelineStart.valueOf()+b);d.timelineFinish=new Date(d.timelineFinish.valueOf()+b);L(a)};a.decreaseTimelinePage=
  function(b){d.timelineStart=new Date(d.timelineStart.valueOf()-b);d.timelineFinish=new Date(d.timelineFinish.valueOf()-b);L(a)};a.setSplitterPosition=function(b){var e=a.gridContainer,f=a.chartContainer,g=a.splitter,b=Math.floor(b*1E6/a.offsetWidth)/1E4;typeof e.percent!==c&&delete e.percent;e.style.width=b+"%";f.style.width=100-b+"%";Ha(g,e,d)};a.getChartPosition=function(a){return I(a,d)};a.getChartWidth=function(){return I(d.timelineFinish,d)};a.getDateTime=function(a){return Ia(a,d)};a.getWorkingTime=
  function(a){return ic(a,d)};a.getStartWorkingTime=function(a){return sa(a,d)};a.getFinishWorkingTime=function(a){return P(a,d,false,true,void 0)};a.getEffort=function(a,b){return N(a,b,d)};a.getFinish=function(a,b){return Q(a,b,d)};a.getStart=function(a,b){return Ua(a,b,d)};a.getCompletion=function(a,b,e){return fb(a,b,e,d)};a.getCompletedFinish=function(a,b,e){return jc(a,b,e,d)};a.getItemsHeight=function(){return va(e,d)};a.getItemTop=function(a){return Ca(a,e,d)};a.onItemPropertyChanged=A;a.initializeTaskDraggingThumbs=
  function(b,d,e,c,f,g,h,p){vb(b,d,e,c,f,g,h,p,a.items,a,a.settings)};a.initializeDependencyDraggingThumbs=function(b,d,e,c,f,g,h){eb(b,d,e,c,f,g,h,a.items,a,a.settings)};a.insertItem=function(b,c){dc(b,c,a,e,d)};a.addItem=function(b){a.insertItem(e.length,b)};a.insertItems=function(b,d){for(var e=0;e<d.length;e++)a.insertItem(b++,d[e])};a.addItems=function(b){for(var d=0;d<b.length;d++)a.addItem(b[d])};a.removeItem=function(b){ec(b,a,e,d)};a.removeItems=function(b){for(var d=0;d<b.length;d++)a.removeItem(b[d])};
  a.increaseItemIndentation=function(b){var f=b.index>0?a.items[b.index-1]:null;if(!(f==null||b.indentation>f.indentation)){ja(b,true,false,true);b.indentation++;A(b,"indentation",true,true);if(b.predecessors&&b.predecessors.length>0){for(var g=false,l=0;l<b.predecessors.length;l++)if(b.predecessors[l].item==f&&b.indentation>f.indentation){b.predecessors.splice(l--,1);g=true}g&&A(b,"predecessors",false,true)}for(g=0;g<e.length;g++){l=e[g];if(!(l!=f||typeof l.predecessors===c||l.predecessors.length==
  0))for(var h=0;h<l.predecessors.length;h++)if(l.predecessors[h].item==b&&f.indentation>l.predecessors[h].item.indentation){l.predecessors.splice(h--,1);A(l,"predecessors",false,true);na(l);ra(l)}}db(e,d)&&Sa(e);for(Ta(b,e,a,d);b!=null;){b.isExpanded||ja(b,true,false);b=b.parent}}};a.decreaseItemIndentation=function(b){var f=b.index<a.items.length-1?a.items[b.index+1]:null;if(!(b.indentation<=0||f!=null&&b.indentation<f.indentation)){b.indentation--;A(b,"indentation",true,true);if(f&&b.predecessors&&
  b.predecessors.length>0){for(var g=false,l=0;l<b.predecessors.length;l++)if(b.predecessors[l].item==f&&b.indentation<f.indentation){b.predecessors.splice(l--,1);g=true}g&&A(b,"predecessors",false,true)}for(g=0;g<e.length;g++){l=e[g];if(!(l!=f||typeof l.predecessors===c||l.predecessors.length==0))for(var h=0;h<l.predecessors.length;h++)if(l.predecessors[h].item==b&&f.indentation<l.predecessors[h].item.indentation){l.predecessors.splice(h--,1);A(l,"predecessors",false,true);na(l);ra(l)}}db(e,d)&&Sa(e);
  for(Ta(b,e,a,d);b!=null;){b.isExpanded||ja(b,true,false);b=b.parent}}};a.setItemContent=function(a,b){a.content=b;A(a,"content",true,true)};a.setItemStart=function(a,b){a.start=sa(b,d,D(a));a.preferredStart=a.start;A(a,"start",true,true);if(a.completedFinish<a.start){a.completedFinish=a.start;A(a,"completedFinish",false,true)}};a.setItemFinish=function(a,b){var e;e=D(a);e=P(b,d,false,true,e);a.finish=e;A(a,"finish",true,true);if(a.completedFinish>a.finish){a.completedFinish=a.finish;A(a,"completedFinish",
  false,true)}};a.setItemIsMilestone=function(a,b){a.isMilestone=b;A(a,"isMilestone",true,true)};a.getItemEffort=function(a){return ga(a,d)};a.setItemEffort=function(a,b){a.finish=Q(a.start,b,d,D(a));A(a,"finish",true,true);if(a.completedFinish>a.finish){a.completedFinish=a.finish;A(a,"completedFinish",false,true)}};a.getItemTotalEffort=function(a){return yb(a)};a.setItemTotalEffort=function(a,b){a.ganttChartView.setItemEffort(a,b/Va(a))};a.setItemHasFixedEffort=function(a,b){a.hasFixedEffort=b;if(!a.hasChildren&&
  a.hasFixedEffort){a.fixedEffort=ga(a,d);a.fixedEffortAssignments=ha(a)}};a.getItemDuration=function(a){return N(a.start,a.finish,d,D(a))};a.setItemDuration=a.setItemEffort;a.getItemCompletedEffort=function(a){return za(a,d)};a.setItemCompletedEffort=function(a,b){a.completedFinish=Q(a.start,b,d,D(a));if(a.completedFinish>a.finish)a.completedFinish=a.finish;A(a,"completedFinish",true,true)};a.getItemTotalCompletedEffort=function(a){return zb(a)};a.setItemTotalCompletedEffort=function(a,b){a.ganttChartView.setItemCompletedEffort(a,
  b/Va(a))};a.getItemCompletion=function(b){return a.getItemCompletedEffort(b)/a.getItemEffort(b)};a.setItemCompletion=function(b,d){a.setItemCompletedEffort(b,d*a.getItemEffort(b))};a.isItemCompleted=function(b){return a.getItemCompletion(b)>=1||(b.isMilestone||b.finish.valueOf()<=b.start.valueOf())&&typeof b.isSetAsCompleted!==c&&b.isSetAsCompleted};a.setItemAsCompleted=function(b){if(b.isMilestone||b.finish.valueOf()<=b.start.valueOf())b.isSetAsCompleted=true;a.setItemCompletion(b,1)};a.hasItemStarted=
  function(a){return Ka(a)};a.setItemAsNotStarted=function(b){if(b.isMilestone||b.finish.valueOf()<=b.start.valueOf())b.isSetAsCompleted=false;a.setItemCompletion(b,0)};a.isItemOnSchedule=function(a){var b=new Date,b=new Date(b.valueOf()-b.getTimezoneOffset()*6E4);return a.completedFinish>=b};a.setItemAssignmentsContent=function(a,b){a.assignmentsContent=b;A(a,"assignmentsContent",true,true)};a.getItemPredecessorsString=function(a,b){var d=b;typeof d===c&&(d=false);var f="";if(!(typeof a.predecessors===
  c||a.predecessors.length==0))for(var g=0;g<a.predecessors.length;g++){var h=a.predecessors[g],p=e.indexOf(h.item);if(!(p<0)){f.length>0&&(f=f+", ");f=f+(p+(!d?1:0));if(typeof h.dependencyType!==c&&h.dependencyType!=""&&h.dependencyType!="FinishStart"&&h.dependencyType!="FS")if(h.dependencyType=="StartStart"||h.dependencyType=="SS")f=f+"SS";else if(h.dependencyType=="FinishFinish"||h.dependencyType=="FF")f=f+"FF";else if(h.dependencyType=="StartFinish"||h.dependencyType=="SF")f=f+"SF";if(typeof h.lag!==
  c&&h.lag!=0){h.lag>0&&(f=f+"+");f=f+h.lag/36E5}}}return f};a.setItemPredecessorsString=function(a,b,d){typeof d===c&&(d=false);var f=[];a.predecessors=f;for(var b=b.split(","),g=0;g<b.length;g++){var h=Xa(b[g]);if(!(h.length<=0)){for(var p=0;p<h.length&&h.charCodeAt(p)>=48&&h.charCodeAt(p)<=57;)p++;var o=h.substr(0,p),o=parseInt(o)-(!d?1:0);if(!isNaN(o)&&!(o<0||o>=e.length)){o=e[o];if(!qb(a,o)&&!Ba(a,o)&&!Ba(o,a)){var h=h.substr(p),p=h.indexOf("+"),r=h.indexOf("-"),m=p>=0?p:r>=0?r:-1,r=0;if(m>=0){var s=
  parseFloat(h.substr(m+1));isNaN(s)||(r=s*(p>=0?1:-1)*36E5)}h=(m<0?h:h.substr(0,m)).toUpperCase();f.push({item:o,dependencyType:h,lag:r})}}}}for(d=0;d<e.length;d++)delete e[d].successors;A(a,"predecessors",true,true)};a.getItemIndexString=function(a,b){typeof b===c&&(b=false);return typeof a.index!==c?(a.index+(!b?1:0)).toString():""};a.getItemWbsIndexString=function(a,b){return yc(a,e,b).toString()};a.moveRange=function(b,d,c){hb(b,d,c,a,e)};a.moveItem=function(b,d){Ab(b,d,a,e)};a.moveItemUp=function(b){var d=
  e.indexOf(b);d<=0||Ab(b,d-1,a,e)};a.moveItemDown=function(b){var d=e.indexOf(b);d<0||d>=e.length-1||Ab(b,d+1,a,e)};a.moveItemHierarchy=function(b,d){for(var c=e.indexOf(b),f=c+1;f<e.length;f++)if(e[f].indentation<=b.indentation)break;hb(c,f-c,d,a,e)};a.moveItemHierarchyUp=function(b){for(var d=e.indexOf(b),c=d+1;c<e.length;c++)if(e[c].indentation<=b.indentation)break;for(var f=d;f-- >0;){if(e[f].indentation<b.indentation)return;if(e[f].indentation==b.indentation)break}hb(d,c-d,f,a,e)};a.moveItemHierarchyDown=
  function(b){for(var d=e.indexOf(b),c=d+1;c<e.length;c++)if(e[c].indentation<=b.indentation)break;for(var c=c-d,f=d+c;f++<e.length-1;)if(e[f].indentation<=b.indentation)break;e[f-1].indentation<b.indentation||hb(d,c,f-c,a,e)};a.exportContent=function(a,b){typeof a===c&&(a={});oc(a.title,a.preparingMessage,a.isGridVisible,a.columnIndexes,a.timelineStart,a.timelineFinish,a.isRelativeToTimezone,a.hourWidth,a.startRowIndex,a.endRowIndex,b,false,a.rotate,false,e,d)};a.print=function(a){typeof a===c&&(a=
  {});oc(a.title,a.preparingMessage,a.isGridVisible,a.columnIndexes,a.timelineStart,a.timelineFinish,a.isRelativeToTimezone,a.hourWidth,a.startRowIndex,a.endRowIndex,null,true,a.rotate,a.autoClose,e,d)};a.getRootItems=function(){for(var a=[],b=0;b<e.length;b++){var d=e[b];d.parent==null&&a.push(d)}return a};a.getLeafItems=function(){for(var a=[],b=0;b<e.length;b++){var d=e[b];d.parent!=null&&a.push(d)}return a};a.getSummaryItems=function(){for(var a=[],b=0;b<e.length;b++){var d=e[b];d.hasChildren&&
  a.push(d)}return a};a.getProjectStart=function(){return pc(e)};a.getProjectFinish=function(){return Bb(e)};a.getProjectEffort=function(){return qc(e,d)};a.getProjectTotalEffort=function(){for(var a=0,b=0;b<e.length;b++){var d=e[b];d.parent==null&&(a=a+yb(d))}return a};a.getProjectCompletedEffort=function(){return rc(e,d)};a.getProjectTotalCompletedEffort=function(){for(var a=0,b=0;b<e.length;b++){var d=e[b];d.parent==null&&(a=a+zb(d))}return a};a.getProjectCompletion=function(){return rc(e,d)/qc(e,
  d)};a.isItemCritical=function(a,b){return jb(a,b,e,d)};a.getCriticalItems=function(a,b){var f;f=a;var g=b?b:e;typeof f===c&&(f=0);if(typeof g===c)f=void 0;else{for(var h=Bb(g),p=0;p<g.length;p++){var o=g[p];o.successorPredecessors=ib(o,g)}for(var m=[],p=0;p<g.length;p++){o=g[p];(!o.hasChildren||!(typeof o.isSummaryEnabled===c||o.isSummaryEnabled))&&jb(o,f,g,d,h)&&m.push(o)}for(p=0;p<g.length;p++){o=g[p];delete o.successorPredecessors}f=m}return f};a.getPertCriticalItems=function(b,c){return Zc(a,
  c?c:e,d,b)};a.ensureDependencyConstraints=function(){Cb(e,d,a)};a.setupBaseline=function(){for(var a=0;a<e.length;a++){var b=e[a];if(!b.hasChildren||!(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)){b.baselineStart=b.start;b.isMilestone?delete b.baselineFinish:b.baselineFinish=b.finish}else{delete b.baselineFinish;delete b.baselineStart}na(b)}};a.rescheduleItemToStart=function(a,b){tc(a,b,e,d)};a.rescheduleItemToFinish=function(a,b){var e=b,e=new Date(e.valueOf()-e.getTimezoneOffset()*6E4),c=
  ga(a,d),f=za(a,d),e=Ua(c,e,d,D(a)),e=sa(e,d,D(a));Db(a,e);$a(a,c,d);ab(a,f,d);Z(a)};a.splitRemainingWork=function(b,f,g){if(typeof e===c||b.hasChildren||b.isMilestone||!Ka(b)||!b.isMilestone&&b.completedFinish>=b.finish)b=null;else{var l=e.indexOf(b);if(l<0)b=null;else{f={content:typeof f===c?b.content:b.content+f,indentation:b.indentation,isExpanded:b.isExpanded,start:b.completedFinish,finish:b.finish,assignmentsContent:b.assignmentsContent,isReadOnly:b.isReadOnly,isHidden:b.isHidden,isBarVisible:b.isBarVisible,
  isBarReadOnly:b.isBarReadOnly,isSummaryEnabled:b.isSummaryEnabled,isParentSummarizationEnabled:b.isParentSummarizationEnabled,displayRowIndex:b.displayRowIndex,"class":b["class"],style:b.style,barClass:b.barClass,standardBarClass:b.standardBarClass,summaryBarClass:b.summaryBarClass,milestoneBarClass:b.milestoneBarClass,baselineBarClass:b.baselineBarClass,barStyle:b.barStyle,standardBarStyle:b.standardBarStyle,summaryBarStyle:b.summaryBarStyle,milestoneBarStyle:b.milestoneBarStyle,baselineBarStyle:b.baselineBarStyle,
  taskTemplate:b.taskTemplate,template:b.template,tag:b.tag};if(typeof g!==c)b.content=b.content+g;b.finish=b.completedFinish;dc(l+1,f,a,e,d);g=ib(b,e);for(l=0;l<g.length;l++){var h=g[l].predecessor;if(typeof h.dependencyType===c||h.dependencyType==""||h.dependencyType=="FinishStart"||h.dependencyType=="FS"||h.dependencyType=="FinishFinish"||h.dependencyType=="FF")h.item=f}f.predecessors=[{item:b}];ra(b);ra(f);b=f}}return b};a.optimizeWork=function(b,f,g,l){var h;typeof b===c&&(b=false);typeof f===
  c&&(f=false);typeof g===c&&(g=new Date);if(l)vc(f,g,e,d,a,true,b);else{g=new Date(g.valueOf()+g.getTimezoneOffset()*6E4);h=[];for(l=0;l<e.length;l++){var p=e[l];if(!p.hasChildren||!(typeof p.isSummaryEnabled===c||p.isSummaryEnabled))if(!(p.start<=g||!f&&Ka(p))){if(b){for(var o=false,m=p;m!=null;){if(typeof m.predecessors!==c&&m.predecessors.length>0){o=true;break}m=m.parent}if(!o)continue}tc(p,g,e,d);h.push(p)}}Cb(e,d,a);for(l=0;l<h.length;l++){b=h[l];A(b,"start",true,true);A(b,"finish",true,true);
  A(b,"completedFinish",true,true);Z(b)}h=void 0}return h};a.levelAllocations=function(b){if(!b)b=a.items;b.length||(b=[b]);for(var d=0;d<b.length;d++){var e=b[d],c,f="",g=ha(e);if(g&&g.length>0){var h=0;for(c=0;c<g.length;c++)h=h+g[c].value;if(h>0){for(c=0;c<g.length;c++){f.length>0&&(f=f+", ");f=f+(g[c].key+(g.length>1?" ["+Math.round(g[c].value/h*1E4)/100+"%]":""))}e.assignmentsContent=f;A(e,"assignmentsContent",false,true);Z(e)}}}};a.levelResources=function(b,c){return vc(b,c,e,d,a)};a.getItemSuccessors=
  function(a){return sc(a,e)};a.getItemSuccessorPredecessorItems=function(a){return ib(a,e)};a.getItemAllocationUnits=Va;a.getItemAssignments=ha;a.getItemAssignedResources=zc;a.getResourceAssignments=function(a){return La(a,e)};a.getResourceAssignedItems=function(a){for(var b=[],a=La(a,e),d=0;d<a.length;d++)b.push(a[d].key);return b};a.getAssignedResources=function(){return Na(e)};a.getItemAssignmentsCost=function(a){return uc(a,d)};a.getItemExtraCost=function(a){return Fb(a,d)};a.getItemCost=function(a){return Eb(a,
  d)};a.setItemCost=function(a,b){a.executionCost=b-Fb(a,d);A(a,"executionCost",true,true)};a.getResourceCost=function(a){for(var b=0,a=La(a,e),f=0;f<a.length;f++){var g=a[f],h;typeof d.specificResourceUsageCosts!==c&&(h=$(d.specificResourceUsageCosts,resource))>=0?b=b+d.specificResourceUsageCosts[h].value*g.value:typeof d.defaultResourceUsageCost!==c&&(b=b+d.defaultResourceUsageCost*g.value);var p=g.key;if(!p.hasChildren||!(typeof p.isSummaryEnabled===c||p.isSummaryEnabled)){p=ga(p,d)/36E5;typeof d.specificResourceHourCosts!==
  c&&(h=$(d.specificResourceHourCosts,resource))>=0?b=b+d.specificResourceHourCosts[h].value*p*g.value:typeof d.defaultResourceHourCost!==c&&(b=b+d.defaultResourceHourCost*p*g.value)}}return b};a.getProjectCost=function(){for(var a=0,b=0;b<e.length;b++){var c=e[b];c.parent==null&&(a=a+Eb(c,d))}return a};a.getScheduleChartItems=function(a){var b=[],a=typeof a!==c?typeof a==="array"?a:[a]:typeof d.assignableResources!==c?d.assignableResources:[],f,g=Na(e),h;for(h=0;h<g.length;h++){f=g[h];a.indexOf(f)<
  0&&a.push(f)}for(h=0;h<a.length;h++){f=a[h];g={tag:f,content:f,ganttChartItems:[]};f=La(f,e);for(var p=0;p<f.length;p++){var o=f[p],m=o.key,o={tag:m,content:m.content,start:m.start,finish:m.finish,completedFinish:m.completedFinish,isMilestone:m.isMilestone,schedule:D(m),assignmentsContent:o.value!=1?Math.round(o.value*1E4)/100+"%":"",minStart:m.minStart,maxStart:m.maxStart,minFinish:m.minFinish,maxFinish:m.maxFinish,isHidden:m.isHidden,isBarVisible:m.isBarVisible,isBarReadOnly:m.isBarReadOnly,isReadOnly:m.isReadOnly,
  isRelativeToTimezone:m.isRelativeToTimezone};g.ganttChartItems.push(o)}b.push(g)}return b};a.getAllocations=function(a){return Ac(a,e)};a.getLoadChartItems=function(a){var b=[];typeof a===c?a=Na(e):typeof a!=="array"&&(a=[a]);for(var f=0;f<a.length;f++){for(var g=a[f],h={tag:g,content:g,ganttChartItems:[]},p=Ac(g,e),o=0;o<p.length;o++){var m=p[o],r=1;if(typeof d.resourceQuantities!==c){var s=$(d.resourceQuantities,g);if(s>=0)r=d.resourceQuantities[s].value}s=d.maxLoadChartDisplayedResourceQuantity;
  typeof s===c&&(s=100);r>s&&(r=s);h.ganttChartItems.push({start:m.key.start,finish:m.key.finish,units:m.value/r,content:Math.round(m.value*1E4)/100+"%",isRelativeToTimezone:false})}b.push(h)}return b};a.getFilteredGanttChartItems=function(a){for(var a=[a],b=[],d=0;d<a.length;d++){var f=a[d],g=[];if(typeof a===c)a=Na(e);else if(typeof a!=="array")var h=La(f,e);for(f=0;f<h.length;f++){var p=h[f].key;if((!p.hasChildren||!(typeof p.isSummaryEnabled===c||p.isSummaryEnabled))&&!(b.indexOf(p)>=0)){g.push({tag:p,
  content:p.content,start:p.start,finish:p.finish,completedFinish:p.completedFinish,isMilestone:p.isMilestone,assignmentsContent:a.length>1?p.assignmentsContent:h[f].value!=1?Math.round(h[f].value*1E4)/100+"%":"",minStart:p.minStart,maxStart:p.maxStart,minFinish:p.minFinish,maxFinish:p.maxFinish,isHidden:p.isHidden,isBarVisible:p.isBarVisible,isBarReadOnly:p.isBarReadOnly,isReadOnly:true,isRelativeToTimezone:p.isRelativeToTimezone});b.push(p)}}}return g};a.copyCommonSettings=function(a){if(typeof a!==
  c){a.target=d.target;a.theme=d.theme;a.border=d.border;a.containerClass=d.containerClass;a.containerStyle=d.containerStyle;a.isGridVisible=d.isGridVisible;a.gridWidth=d.gridWidth;a.chartWidth=d.chartWidth;a.isSplitterEnabled=d.isSplitterEnabled;a.splitterWidth=d.splitterWidth;a.splitterBackground=d.splitterBackground;a.minGridWidth=d.minGridWidth;a.minChartWidth=d.minChartWidth;a.headerBackground=d.headerBackground;a.headerHeight=d.headerHeight;a.indentationLevelWidth=d.indentationLevelWidth;a.gridLines=
  d.gridLines;a.horizontalGridLines=d.horizontalGridLines;a.verticalGridLines=d.verticalGridLines;a.horizontalChartLines=d.horizontalChartLines;a.displayedTime=d.displayedTime;a.currentTime=d.currentTime;a.timelineStart=d.timelineStart;a.timelineFinish=d.timelineFinish;a.scales=d.scales;a.updateScale=d.updateScale;a.hourWidth=d.hourWidth;a.workingWeekStart=d.workingWeekStart;a.workingWeekFinish=d.workingWeekFinish;a.visibleDayStart=d.visibleDayStart;a.visibleDayFinish=d.visibleDayFinish;a.visibleWeekStart=
  d.visibleWeekStart;a.visibleWeekFinish=d.visibleWeekFinish;a.specialNonworkingDays=d.specialNonworkingDays;a.months=d.months;a.daysOfWeek=d.daysOfWeek;a.weekStartDay=d.weekStartDay;a.dateFormatter=d.dateFormatter;a.dateTimeFormatter=d.dateTimeFormatter;a.dateTimeParser=d.dateTimeParser;a.isRelativeToTimezone=d.isRelativeToTimezone}};a.getPertChartItems=function(a,b,f,g,h,p,o){var m=a,r=b,a=f,s=h,h=p,v=o?o:e;if(typeof m===c||m<0)m=Number.MAX_VALUE;typeof r===c&&(r="Start");typeof a===c&&(a="Finish");
  typeof s===c&&(s=" completed");typeof h===c&&(h=" starting");for(var x=new Date((new Date(1E4,0,1)).valueOf()-1),o=[],q,F,z,A,p=[],b=0;b<v.length;b++){f=v[b];f.indentation<=m&&(!f.hasChildren||!(typeof f.isSummaryEnabled===c||f.isSummaryEnabled||typeof f.isBarVisible!==c&&!f.isBarVisible)||f.indentation==m)&&p.push({key:f,value:[]})}for(b=0;b<p.length;b++){var f=p[b].key,u=[f];if(f.indentation==m&&f.hasChildren&&(typeof f.isSummaryEnabled===c||f.isSummaryEnabled||typeof f.isBarVisible!==c&&!f.isBarVisible))for(q=
  0;q<v.length;q++){F=v[q];Ya(F,f)&&u.push(F)}var E=p[b].value;for(q=0;q<u.length;q++)for(var B=u[q];B!=null;){if(typeof B.predecessors!==c)for(z=0;z<B.predecessors.length;z++)if(!(typeof B.predecessors[z].item===c||typeof B.predecessors[z].dependencyType!==c&&B.predecessors[z].dependencyType!=""&&B.predecessors[z].dependencyType!="FinishStart"&&B.predecessors[z].dependencyType!="FS")){for(var C=A=B.predecessors[z].item;C!=null&&$(p,C)<0;)C=C.parent;if(C!=f){var G=[];if(C!=null)G.push(C);else for(C=
  0;C<p.length;C++){F=p[C].key;Ya(F,A)&&G.push(F)}for(C=0;C<G.length;C++){A=G[C];E.indexOf(A)<0&&(m<Number.MAX_VALUE&&Gb(p,A,f)||E.push(A))}}}B=B.parent}}C=0;z=q=null;for(b=0;b<v.length;b++){f=v[b];if(q==null||f.start<q)q=f.start;if(z==null||f.finish>z)z=f.finish}q==null&&(q=x);r={content:r,displayedText:(C++).toString(),displayedRowIndex:0,displayedColumnIndex:0};o.push(r);v=[r];m=[];for(b=0;b<p.length;b++)p[b].value.length==0&&m.push(p[b].key);if(m.length>0){v=[];for(b=0;b<m.length;b++){f=m[b];z=
  r;x=(C++).toString();if(f.start>q){z={content:f.content!=null?f.content.toString()+h:null,displayedText:x,predecessors:[]};o.push(z);z.predecessors.push({item:r,content:g,isEffortVirtual:true})}x={content:f.content+s,displayedText:x+(z!=r?"'":""),predecessors:[],tag:f};v.push(x);o.push(x);x.predecessors.push({item:z,content:Ga(f),displayedText:f.content!=null?f.content.toString():null,effort:N(f.start,f.finish,d,D(f)),tag:f})}do{u=[];for(b=0;b<v.length;b++)u.push(v[b]);f=false;for(b=0;b<v.length;b++){m=
  v[b];x=m.tag;E=[];for(q=0;q<p.length;q++)p[q].value.indexOf(x)>=0&&E.push(p[q].key);if(E.length>0){u.splice(u.indexOf(m),1);for(q=0;q<E.length;q++){f=E[q];x=null;for(z=0;z<o.length;z++)if(o[z].tag==f){x=o[z];break}if(x==null){x={content:f.content+s,displayedText:(C++).toString(),predecessors:[],tag:f};u.push(x);o.push(x)}x.predecessors.push({item:m,content:Ga(f),displayedText:f.content!=null?f.content.toString():null,effort:N(f.start,f.finish,d,D(f)),tag:f})}f=true}}v=u}while(f)}f={content:a,displayedText:(C++).toString(),
  predecessors:[],displayedRowIndex:0};o.push(f);f=f.predecessors;for(b=0;b<v.length;b++)f.push({item:v[b]});for(q=0;q<p.length;q++){f=p[q].key;m=null;for(z=0;z<o.length;z++)if(o[z].tag==f){m=o[z];break}if(m!=null){b=[];if(typeof m.predecessors!==c)for(z=0;z<m.predecessors.length;z++)m.predecessors[z].tag==f&&b.push(m.predecessors[z]);if(b.length>1){s={content:f.content!=null?f.content.toString()+h:null,displayedText:m.displayedText,predecessors:[]};o.splice(o.indexOf(m),0,s);C=s.predecessors;for(z=
  0;z<b.length;z++){a=b[z];m.predecessors.splice(m.predecessors.indexOf(a),1);C.push({item:a.item,content:g,isEffortVirtual:true})}m.predecessors.push({item:s,content:Ga(f),displayedText:f.content!=null?f.content.toString():null,effort:N(f.start,f.finish,d,D(f)),tag:f});m.displayedText=m.displayedText+"'"}else if(b.length==1){a=b[0];b=a.item.tag;if(b!=null&&f.start>sa(b.finish,d)){z={content:f.content!=null?f.content.toString()+h:null,displayedText:m.displayedText,predecessors:[]};o.splice(o.indexOf(m),
  0,z);z.predecessors.push({item:a.item,content:g,isEffortVirtual:true});m.predecessors.splice(0,m.predecessors.length);m.predecessors.push({item:z,content:Ga(f),displayedText:f.content!=null?f.content.toString():null,effort:N(f.start,f.finish,d,D(f)),tag:f});m.displayedText=m.displayedText+"'"}}}}for(b=0;b<p.length;b++)if(p[b].key.isMilestone){f=p[b].key;m=null;for(z=0;z<o.length;z++)if(o[z].tag==f){m=o[z];break}if(m!=null&&typeof m.predecessors!==c&&m.predecessors.length==1){a=m.predecessors[0];if(a.item!=
  r&&a.tag==f){m.predecessors.splice(0,1);x=a.item;for(z=0;z<x.predecessors.length;z++){g=x.predecessors[z];a.item.predecessors.splice(a.item.predecessors.indexOf(g),1);m.predecessors.push(g)}for(z=0;z<o.length;z++){g=o[z];if(g.predecessors)for(C=0;C<g.predecessors.length;C++){h=g.predecessors[C];if(h.item==x)h.item=m}}m.content=f.content!=null?f.content.toString():null;m.displayedText=m.displayedText.replace("'","");o.splice(o.indexOf(x),1)}}}return o};a.getNetworkDiagramItems=function(a,b,f,g){var h=
  a,p=b,m=f,o=g?g:e;if(typeof h===c||h<0)h=Number.MAX_VALUE;typeof p===c&&(p="Start");typeof m===c&&(m="Finish");for(var g=new Date(1900,0,1),f=new Date((new Date(1E4,0,1)).valueOf()-1),b=[],r,s,v,q,x,z,F=[],a=0;a<o.length;a++){r=o[a];r.indentation<=h&&(!r.hasChildren||!(typeof r.isSummaryEnabled===c||r.isSummaryEnabled||typeof r.isBarVisible!==c&&!r.isBarVisible)||r.indentation==h)&&F.push({key:r,value:[]})}for(a=0;a<F.length;a++){r=F[a].key;x=[r];if(r.indentation==h&&r.hasChildren&&(typeof r.isSummaryEnabled===
  c||r.isSummaryEnabled||typeof r.isBarVisible!==c&&!r.isBarVisible))for(s=0;s<o.length;s++){v=o[s];Ya(v,r)&&x.push(v)}var A=F[a].value;for(s=0;s<x.length;s++)for(var u=x[s];u!=null;){if(typeof u.predecessors!==c)for(q=0;q<u.predecessors.length;q++)if(!(typeof u.predecessors[q].item===c||typeof u.predecessors[q].dependencyType!==c&&u.predecessors[q].dependencyType!=""&&u.predecessors[q].dependencyType!="FinishStart"&&u.predecessors[q].dependencyType!="FS")){for(v=z=u.predecessors[q].item;v!=null&&$(F,
  v)<0;)v=v.parent;if(v!=r){var E=[];if(v!=null)E.push(v);else for(var B=0;B<F.length;B++){v=F[B].key;Ya(v,z)&&E.push(v)}for(z=0;z<E.length;z++){v=E[z];A.indexOf(v)<0&&(h<Number.MAX_VALUE&&Gb(F,v,r)||A.push(v))}}}u=u.parent}}z=s=null;for(a=0;a<o.length;a++){r=o[a];if(s==null||r.start<s)s=r.start;if(z==null||r.finish>z)z=r.finish}s==null&&(s=f);z==null&&(z=g);p={content:p,displayedText:p,earlyStart:s,earlyFinish:s,lateStart:f,lateFinish:f,isMilestone:true,effort:0,displayedRowIndex:0,displayedColumnIndex:0};
  b.push(p);h=[p];s=[];for(a=0;a<F.length;a++)F[a].value.length==0&&s.push(F[a].key);if(s.length>0){h=[];for(a=0;a<s.length;a++){r=s[a];q={content:Ga(r),displayedText:r.content,earlyStart:g,earlyFinish:g,lateStart:f,lateFinish:f,effort:N(r.start,r.finish,d,D(r)),isMilestone:r.isMilestone,predecessors:[],tag:r};h.push(q);b.push(q);q.earlyStart=sa(p.earlyFinish,d);q.earlyFinish=Q(q.earlyStart,q.effort,d);q.predecessors.push({item:p,tag:r})}do{A=[];for(a=0;a<h.length;a++)A.push(h[a]);q=false;for(a=0;a<
  h.length;a++){o=h[a];r=o.tag;u=[];for(s=0;s<F.length;s++)F[s].value.indexOf(r)>=0&&u.push(F[s].key);if(u.length>0){A.splice(A.indexOf(o),1);for(s=0;s<u.length;s++){r=u[s];x=null;for(q=0;q<b.length;q++)if(b[q].tag==r){x=b[q];break}if(x==null){x={content:Ga(r),displayedText:r.content,earlyStart:g,earlyFinish:g,lateStart:f,lateFinish:f,effort:N(r.start,r.finish,d,D(r)),isMilestone:r.isMilestone,predecessors:[],tag:r};A.push(x);b.push(x)}q=sa(o.earlyFinish,d);if(q>x.earlyStart){x.earlyStart=q;x.earlyFinish=
  Q(x.earlyStart,x.effort,d)}x.predecessors.push({item:o,tag:r})}q=true}}h=A}while(q)}m={content:m,displayedText:m,earlyStart:g,earlyFinish:g,lateStart:z,lateFinish:z,isMilestone:true,effort:0,predecessors:[],displayedRowIndex:0};b.push(m);s=m.predecessors;for(a=0;a<h.length;a++){F=h[a];q=F.earlyFinish;if(q>m.earlyStart){m.earlyStart=q;m.earlyFinish=m.earlyStart}s.push({item:F})}for(h=[m];h.length>0;){F=[];for(a=0;a<h.length;a++){o=h[a];if(typeof o.predecessors!==c)for(s=0;s<o.predecessors.length;s++){z=
  o.predecessors[s];x=z.item;r=false;for(q=0;q<F.length;q++)if(F[q]==x){r=true;break}r||F.push(x);r=o.lateStart;if(r<x.lateFinish){x.lateFinish=x.effort>0?P(r,d,false,true,void 0):r;x.lateStart=Ua(x.effort,x.lateFinish,d)}}}h=F}if(b.length>2)for(a=0;a<b.length;a++){r=b[a];r.slack=N(r.earlyStart,r.lateStart,d)}else{p.earlyStart=g;p.earlyFinish=g;p.lateStart=g;p.lateFinish=g;m.earlyStart=f;m.earlyFinish=f;m.lateStart=f;m.lateFinish=f}for(a=0;a<b.length;a++)b[a].isRelativeToTimezone=false;return b};a.getOutputDate=
  Bc;a.getInputDate=Cc;a.itemDependsOf=function(a,b){return Fa(a,b)}};return{initialize:ca,initializeItems:H,refresh:L,getDefaultColumns:q,getDefaultCollapsedToggleButtonTemplate:Hb,getDefaultExpandedToggleButtonTemplate:Ib,getDefaultScales:Jb,getDefaultStyleDefinitionTemplate:Kb,getDefaultStandardTaskTemplate:Lb,getDefaultSummaryTaskTemplate:Mb,getDefaultMilestoneTaskTemplate:Nb,getDefaultItemTemplate:Ob,getDefaultAssignmentsTemplate:Pb,getDefaultDependencyLineTemplate:Qb,getDefaultPredecessorItemTemplate:Rb,
  initializeTaskDraggingThumbs:function(a,e,d,b,c,f,h,n){c.ganttChartView.initializeTaskDraggingThumbs(a,e,d,b,c,f,h,n)},initializeDependencyDraggingThumb:function(a,e,d,b,c){d.ganttChartView.initializeDependencyDraggingThumb(a,e,d,b,c)},getWorkingTime:ic,getEffort:N,getFinish:Q,getStart:Ua,getCompletion:fb,getCompletedFinish:jc,getWeekStart:function(a,e){return xa(a,e)},getWeekFinish:mb,defaultDateTimeFormatter:function(a){return ta(x(a))},defaultDateFormatter:function(a){return da(x(a))},defaultDateTimeParser:function(a){return o(p(a))},
  textColumnTemplateBase:function(a,e,d){e=e();if(typeof e===c||typeof d!==c&&!d())e="";return a.createTextNode(e)},textInputColumnTemplateBase:function(a,e,d,b,g,f,h){var n=a.createElement("input");n.setAttribute("type","text");a=d();typeof a===c&&(a="");n.setAttribute("value",a);a="";typeof f!==c&&!f()&&(a="; display: none");f="";typeof h!==c&&h()&&(f="; font-weight: bold");n.setAttribute("style","background-color: Transparent; width: "+e+"px; border-width: 0px; padding: 0px"+a+f);typeof g!==c&&!g()&&
  n.setAttribute("disabled","true");n.addEventListener("change",function(){b(n.value)},true);n.addEventListener("keypress",function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();b(n.value)}},true);n.addEventListener("focus",function(){n.style.backgroundColor="White"},true);n.addEventListener("blur",function(){n.style.backgroundColor="Transparent"},true);return n},optionSelectColumnTemplateBase:function(a,e,d,b,g,f,h,n){var k=a.createElement("select"),j=function(b,d){var e=a.createElement("option");
  e.appendChild(a.createTextNode(b));b==d&&e.setAttribute("selected",true);k.appendChild(e)},b=b();typeof b===c&&(b="");j("",b);for(var d=d(),l=0;l<d.length;l++)j(d[l],b);j="";typeof h!==c&&!h()&&(j="; display: none");h="";typeof n!==c&&n()&&(h="; font-weight: bold");k.setAttribute("style","background-color: Transparent; width: "+e+"px; border-width: 0px; padding: 0px"+j+h);typeof f!==c&&!f()&&k.setAttribute("disabled","true");k.addEventListener("change",function(){g(k.value)},true);k.addEventListener("keypress",
  function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();g(k.value)}},true);k.addEventListener("focus",function(){k.style.backgroundColor="White"},true);k.addEventListener("blur",function(){k.style.backgroundColor="Transparent"},true);return k},numberInputColumnTemplateBase:function(a,e,d,b,c,f,h){return DlhSoft.Controls.GanttChartView.textInputColumnTemplateBase(a,e,function(){var a=d();return!isNaN(a)?a:""},function(a){a=parseFloat(a);isNaN(a)&&(a=0);b(a)},c,f,h)},percentInputColumnTemplateBase:function(a,
  e,d,b,c,f,h){return DlhSoft.Controls.GanttChartView.numberInputColumnTemplateBase(a,e,d,function(a){a<0&&(a=0);a>100&&(a=100);b(a)},c,f,h)},timeSpanInputColumnTemplateBase:function(a,e,d,b,g,f,h,p){typeof g===c&&(g=1);return DlhSoft.Controls.GanttChartView.numberInputColumnTemplateBase(a,e,function(){var a=d()/(36E5*g);return Math.round(a*100)/100},function(a){a=parseFloat(a);a<0&&(a=0);b(a*36E5*g)},f,h,p)},datePickerInputColumnTemplateBase:function(a,e,d,b,g,f,h,p,k,j,l,m,o,s){l||(l=["Su","Mo","Tu",
  "We","Th","Fr","Sa"]);var q=m,r=o;if(!m)m=DlhSoft.Controls.GanttChartView.defaultDateTimeFormatter;if(!o)o=DlhSoft.Controls.GanttChartView.defaultDateTimeParser;var v=a.createElement("input");v.setAttribute("type","text");d=d();typeof d===c?d="":d!=null&&(d=m(d));v.setAttribute("value",d);DlhSoft.Controls.DatePicker&&v.addEventListener("focus",function(){var b=DlhSoft.Controls.DatePicker.get(v);if(!b||!b.isOpen){var d=0,e=0;try{d=v.selectionStart;e=v.selectionEnd}catch(c){}b=DlhSoft.Controls.DatePicker.initialize(v,
  void 0,{inputStyle:null,defaultTimeOfDay:p,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0",calendarSelectorLevels:k,months:j,daysOfWeek:Za(l),weekStart:s,dateTimeFormatter:q,dateTimeParser:r},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");b.openDropDown();setTimeout(function(){try{v.selectionStart=d;v.selectionEnd=e}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==
  null?setTimeout(function(){try{v.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents");b.initEvent("blur",true,false);v.dispatchEvent(b)})}},true);m="";typeof f!==c&&!f()&&(m="; display: none");f="";typeof h!==c&&h()&&(f="; font-weight: bold");v.setAttribute("style","background-color: Transparent; width: "+e+"px; border-width: 0px; padding: 0px"+m+f);typeof g!==c&&!g()&&v.setAttribute("disabled","true");var x=function(){var a=v.value,a=a!=""?o(a):null;b(a)};
  v.addEventListener("change",function(){x()},true);v.addEventListener("keypress",function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();x()}},true);v.addEventListener("focus",function(){v.style.backgroundColor="White"},true);v.addEventListener("blur",function(){v.style.backgroundColor="Transparent"},true);return v},dateTimePickerInputColumnTemplateBase:function(a,e,d,b,g,f,h,p,k,j,l,m,o,s){l||(l=["Su","Mo","Tu","We","Th","Fr","Sa"]);var v=m,r=o;if(!m)m=DlhSoft.Controls.GanttChartView.defaultDateTimeFormatter;
  if(!o)o=DlhSoft.Controls.GanttChartView.defaultDateTimeParser;var q=a.createElement("input");q.setAttribute("type","text");d=d();typeof d===c?d="":d!=null&&(d=m(d));q.setAttribute("value",d);(DlhSoft.Controls.DateTimePicker||DlhSoft.Controls.DatePicker)&&q.addEventListener("focus",function(){var b=(DlhSoft.Controls.DateTimePicker?DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).get(q);if(!b||!b.isOpen){var d=0,e=0;try{d=q.selectionStart;e=q.selectionEnd}catch(c){}b=(DlhSoft.Controls.DateTimePicker?
  DlhSoft.Controls.DateTimePicker:DlhSoft.Controls.DatePicker).initialize(q,void 0,{inputStyle:null,defaultTimeOfDay:p,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0",calendarSelectorLevels:k,months:j,daysOfWeek:Za(l),weekStart:s,dateTimeFormatter:v,dateTimeParser:r},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");b.openDropDown();setTimeout(function(){try{q.selectionStart=
  d;q.selectionEnd=e}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{q.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents");b.initEvent("blur",true,false);q.dispatchEvent(b)})}},true);m="";typeof f!==c&&!f()&&(m="; display: none");f="";typeof h!==c&&h()&&(f="; font-weight: bold");q.setAttribute("style","background-color: Transparent; width: "+e+"px; border-width: 0px; padding: 0px"+m+f);typeof g!==c&&
  !g()&&q.setAttribute("disabled","true");var x=function(){var a=q.value,a=a!=""?o(a):null;b(a)};q.addEventListener("change",function(){x()},true);q.addEventListener("keypress",function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();x()}},true);q.addEventListener("focus",function(){q.style.backgroundColor="White"},true);q.addEventListener("blur",function(){q.style.backgroundColor="Transparent"},true);return q},multiSelectorComboBoxInputColumnTemplateBase:function(a,e,d,b,g,f,h,p){var k=
  a.createElement("input");k.setAttribute("type","text");b=b();typeof b===c&&(b="");k.setAttribute("value",b);DlhSoft.Controls.MultiSelectorComboBox&&k.addEventListener("focus",function(){var b=DlhSoft.Controls.MultiSelectorComboBox.get(k);if(!b||!b.isOpen&&b.availableChoices.length>0){var b=d(),e=0,c=0;try{e=k.selectionStart;c=k.selectionEnd}catch(f){}b=DlhSoft.Controls.MultiSelectorComboBox.initialize(k,b,void 0,{inputStyle:null,autoAppendAvailableChoices:false,isDropDownButtonVisible:false,popupStyle:"margin-top: 1px; background-color: White; border: 1px solid #e0e0e0; color: Black; font-size: small; max-height: 188px; overflow-y: auto"},
  "DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");b.openDropDown();setTimeout(function(){try{k.selectionStart=e;k.selectionEnd=c}catch(a){}},100);navigator.userAgent.match(/(Android)|(IPad)|(IPhone)/i)==null?setTimeout(function(){try{k.focus()}catch(a){}},100):a.createEvent&&setTimeout(function(){var b=a.createEvent("MouseEvents");b.initEvent("blur",true,false);k.dispatchEvent(b)})}},true);b="";typeof h!==c&&
  !h()&&(b="; display: none");h="";typeof p!==c&&p()&&(h="; font-weight: bold");k.setAttribute("style","background-color: Transparent; width: "+e+"px; border-width: 0px; padding: 0px"+b+h);typeof f!==c&&!f()&&k.setAttribute("disabled","true");k.addEventListener("change",function(){g(k.value)},true);k.addEventListener("keypress",function(a){if(a.keyCode==13){a.preventDefault();a.stopPropagation();g(k.value)}},true);k.addEventListener("focus",function(){k.style.backgroundColor="White"},true);k.addEventListener("blur",
  function(){k.style.backgroundColor="Transparent"},true);return k},dateTimeInputColumnTemplateBase:function(a,e,d,b,c,f,h){return DlhSoft.Controls.GanttChartView.textInputColumnTemplateBase(a,e,function(){var a=d();return a!=null?DlhSoft.Controls.GanttChartView.defaultDateTimeFormatter(a):""},function(a){a=a!=""?DlhSoft.Controls.GanttChartView.defaultDateTimeParser(a):null;b(a)},c,f,h)},getIndexColumnTemplate:function(){return function(a){var e=a.ganttChartView;return DlhSoft.Controls.GanttChartView.textColumnTemplateBase(e.ownerDocument,
  function(){return e.getItemIndexString(a)})}},getWbsColumnTemplate:function(a){return function(e){var d=e.ganttChartView;return DlhSoft.Controls.GanttChartView.textColumnTemplateBase(d.ownerDocument,function(){return d.getItemWbsIndexString(e,a)})}},getEffortColumnTemplate:function(a,e,d){typeof e===c&&(e=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemEffort(b)},function(a){g.setItemEffort(b,
  a);g.refreshItemPath(b)},e,function(){return!(b.isReadOnly||d||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&&!(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone||typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getDurationColumnTemplate:function(a,e,d){typeof e===
  c&&(e=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemDuration(b)},function(a){g.setItemDuration(b,a);g.refreshItemPath(b)},e,function(){return!(b.isReadOnly||d||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&&!(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone||
  typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getTotalEffortColumnTemplate:function(a,e,d){typeof e===c&&(e=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemTotalEffort(b)},function(a){g.setItemTotalEffort(b,a);g.refreshItemPath(b)},e,function(){return!(b.isReadOnly||d||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==
  c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&&!(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone||typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getCompletedEffortColumnTemplate:function(a,e,d){typeof e===c&&(e=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument,
  a,function(){return g.getItemCompletedEffort(b)},function(a){g.setItemCompletedEffort(b,a);g.refreshItemPath(b)},e,function(){return!(b.isReadOnly||d||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&&!(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone||typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===
  c||b.isSummaryEnabled)})}},getTotalCompletedEffortColumnTemplate:function(a,e,d){typeof e===c&&(e=1);return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.timeSpanInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemTotalCompletedEffort(b)},function(a){g.setItemTotalCompletedEffort(b,a);g.refreshItemPath(b)},e,function(){return!(b.isReadOnly||d||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))&&
  !(b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled))},function(){return!(b.isMilestone||typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getCompletionColumnTemplate:function(a,e){return function(d){var b=d.ganttChartView;return DlhSoft.Controls.GanttChartView.percentInputColumnTemplateBase(b.ownerDocument,a,function(){var a=b.getItemCompletion(d)*100;return Math.round(a*100)/100},function(a){if(typeof d.gridItem!==
  c&&typeof d.completedInput!==c){var e=d.completedInput;typeof e.changeEventListener!==c&&e.removeEventListener("change",e.changeEventListener,true);delete d.completedInput}a=parseFloat(a)/100;b.setItemCompletion(d,a);b.refreshItemPath(d)},function(){return!(d.isReadOnly||e||typeof d.ganttChartView!==c&&typeof d.ganttChartView.settings!==c&&(d.ganttChartView.settings.isReadOnly||d.ganttChartView.settings.isGridReadOnly))&&!(d.hasChildren&&(typeof d.isSummaryEnabled===c||d.isSummaryEnabled))},function(){return!(d.isMilestone||
  typeof d.isBarVisible!==c&&!d.isBarVisible)},function(){return d.hasChildren&&(typeof d.isSummaryEnabled===c||d.isSummaryEnabled)})}},getCostColumnTemplate:function(a,e){return function(d){var b=d.ganttChartView;return DlhSoft.Controls.GanttChartView.numberInputColumnTemplateBase(b.ownerDocument,a,function(){return b.getItemCost(d)},function(a){b.setItemCost(d,a);b.refreshItemPath(d)},function(){return!(d.isReadOnly||e||typeof d.ganttChartView!==c&&typeof d.ganttChartView.settings!==c&&(d.ganttChartView.settings.isReadOnly||
  d.ganttChartView.settings.isGridReadOnly))},void 0,function(){return d.hasChildren&&(typeof d.isSummaryEnabled===c||d.isSummaryEnabled)})}},getPredecessorsColumnTemplate:function(a,e,d){return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.textInputColumnTemplateBase(g.ownerDocument,a,function(){return g.getItemPredecessorsString(b,d)},function(a){g.setItemPredecessorsString(b,a,d);g.refreshItemGraph(b)},function(){return!(b.isReadOnly||e||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==
  c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))},function(){return!(typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getAssignmentSelectorColumnTemplate:function(a,e,d){return function(b){var g=b.ganttChartView;return DlhSoft.Controls.GanttChartView.optionSelectColumnTemplateBase(g.ownerDocument,a,function(){return typeof e==="array"?e:e(b)},function(){return b.assignmentsContent},
  function(a){b.assignmentsContent=a;g.onItemPropertyChanged(b,"assignmentsContent",true,true);g.refreshItem(b)},function(){return!(b.isReadOnly||d||typeof b.ganttChartView!==c&&typeof b.ganttChartView.settings!==c&&(b.ganttChartView.settings.isReadOnly||b.ganttChartView.settings.isGridReadOnly))},function(){return!(typeof b.isBarVisible!==c&&!b.isBarVisible)},function(){return b.hasChildren&&(typeof b.isSummaryEnabled===c||b.isSummaryEnabled)})}},getBaselineStartColumnTemplate:function(a,e,d,b,g,f,
  h,p,k){typeof e===c&&(e=true);typeof d===c&&(d=true);return function(j){var l=j.ganttChartView;return(e?d?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.baselineStart!=null?x(j.baselineStart):void 0},function(a){a!=null?j.baselineStart=o(a):delete j.baselineStart;l.onItemPropertyChanged(j,"baselineStart",true,
  true);l.refreshItem(j)},function(){return!(j.isReadOnly||p||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))},function(){return!(typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b,g,f,h,function(a){return a==null?"":l.settings.dateTimeFormatter(a)},function(a){return a==""?null:l.settings.dateTimeParser(a)},k)}},getBaselineFinishColumnTemplate:function(a,
  e,d,b,g,f,h,p,k){typeof e===c&&(e=true);typeof d===c&&(d=true);return function(j){var l=j.ganttChartView;return(e?d?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.baselineFinish!=null?x(j.baselineFinish):void 0},function(a){a!=null?j.baselineFinish=o(a):delete j.baselineFinish;l.onItemPropertyChanged(j,"baselineFinish",
  true,true);l.refreshItem(j)},function(){return!(j.isReadOnly||p||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))},function(){return!(j.isMilestone||typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b?b:864E5,g,f,h,function(a){return a==null?"":l.settings.dateTimeFormatter(a)},function(a){return a==""?null:l.settings.dateTimeParser(a)},
  k)}},getMinStartColumnTemplate:function(a,e,d,b,g,f,h,p,k){typeof e===c&&(e=true);typeof d===c&&(d=true);return function(j){var l=j.ganttChartView;return(e?d?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.minStart!=null?x(j.minStart):void 0},function(a){a!=null?j.minStart=o(a):delete j.minStart;l.onItemPropertyChanged(j,
  "minStart",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly||p||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))&&!(j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled))},function(){return!(typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b,g,f,h,function(a){return a==null?"":l.settings.dateTimeFormatter(a)},
  function(a){return a==""?null:l.settings.dateTimeParser(a)},k)}},getMaxStartColumnTemplate:function(a,e,d,b,g,f,h,p,k){typeof e===c&&(e=true);typeof d===c&&(d=true);return function(j){var l=j.ganttChartView;return(e?d?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.maxStart!=null?x(j.maxStart):void 0},function(a){a!=
  null?j.maxStart=o(a):delete j.maxStart;l.onItemPropertyChanged(j,"maxStart",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly||p||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))&&!(j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled))},function(){return!(typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},
  b?b:864E5,g,f,h,function(a){return a==null?"":l.settings.dateTimeFormatter(a)},function(a){return a==""?null:l.settings.dateTimeParser(a)},k)}},getMinFinishColumnTemplate:function(a,e,d,b,g,f,h,p,k){typeof e===c&&(e=true);typeof d===c&&(d=true);return function(j){var l=j.ganttChartView;return(e?d?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,
  a,function(){return j.minFinish!=null?x(j.minFinish):void 0},function(a){a!=null?j.minFinish=o(a):delete j.minFinish;l.onItemPropertyChanged(j,"minFinish",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly||p||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))&&!(j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled))},function(){return!(j.isMilestone||typeof j.isBarVisible!==c&&
  !j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b,g,f,h,function(a){return a==null?"":l.settings.dateTimeFormatter(a)},function(a){return a==""?null:l.settings.dateTimeParser(a)},k)}},getMaxFinishColumnTemplate:function(a,e,d,b,g,f,h,p,k){typeof e===c&&(e=true);typeof d===c&&(d=true);return function(j){var l=j.ganttChartView;return(e?d?DlhSoft.Controls.GanttChartView.dateTimePickerInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.datePickerInputColumnTemplateBase:
  DlhSoft.Controls.GanttChartView.dateTimeInputColumnTemplateBase)(l.ownerDocument,a,function(){return j.maxFinish!=null?x(j.maxFinish):void 0},function(a){a!=null?j.maxFinish=o(a):delete j.maxFinish;l.onItemPropertyChanged(j,"maxFinish",true,true);l.refreshItem(j)},function(){return!(j.isReadOnly||p||typeof j.ganttChartView!==c&&typeof j.ganttChartView.settings!==c&&(j.ganttChartView.settings.isReadOnly||j.ganttChartView.settings.isGridReadOnly))&&!(j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled))},
  function(){return!(j.isMilestone||typeof j.isBarVisible!==c&&!j.isBarVisible)},function(){return j.hasChildren&&(typeof j.isSummaryEnabled===c||j.isSummaryEnabled)},b?b:864E5,g,f,h,function(a){return a==null?"":l.settings.dateTimeFormatter(a)},function(a){return a==""?null:l.settings.dateTimeParser(a)},k)}},getIconColumnTemplate:function(a,e,d,b,g,f,h,p,k){if(typeof a==="string")var j=a,a=function(){return j};typeof b===c||b==false?b=function(){return false}:b==true&&(b=function(){return true});return function(j){var m=
  j.ganttChartView,o=m.ownerDocument.createElement("img");o.setAttribute("src",a(j));typeof e!==c&&o.setAttribute("class",e);typeof d!==c&&o.setAttribute("style",d);if(!m.settings.isReadOnly&&!m.settings.isGridReadOnly&&b(j)){o.style.cursor="move";Xc(o,j,m.items,m,m.settings,g,f,h,p,k)}return o}},getOutputDate:Bc,getInputDate:Cc}}());
  void 0==DlhSoft.Controls.ScheduleChartView&&(DlhSoft.Controls.ScheduleChartView=function(){var c=function(c,o,m,q,s){c.internalEventListeners&&c.internalEventListeners.push({object:o,event:m,handler:q,useCapture:s});return q},U=function(c,o,m,q){var s=["DlhSoft.Controls","ScheduleChartView","DlhSoft.ProjectData.GanttChart.HTML.Controls","5","validate","Licensing"];DlhSoft[s[5]][s[4]](c,s[0],s[1],s[2],s[3],q,m);c.isScheduleChartInitializing=true;for(var q=o,o=[],F=s=0,v=0;v<q.length;v++){var z=q[v];
  if(!(typeof z.scheduleChartItem!=="undefined"&&z.scheduleChartItem!=z)){z.scheduleChartIndex=s++;if(!z.isHidden)z.scheduleChartVisibilityIndex=F++;z.isBarVisible=false;o.push(z);if(typeof z.ganttChartItems!=="undefined")for(var u=0;u<z.ganttChartItems.length;u++){var B=z.ganttChartItems[u];B.scheduleChartItem=z;if(z.isHidden)B.isHidden=true;B.displayRowIndex=z.scheduleChartVisibilityIndex;B.indentation=(z.indentation?z.indentation:0)+1;o.push(B)}}}typeof m!=="object"&&(m={});DlhSoft.Controls.GanttChartView.initializeItems(o,
  m);s=m;F=o;W(s);if(typeof s.gridWidth==="undefined")s.gridWidth="15%";if(typeof s.chartWidth==="undefined")s.chartWidth=s.isGridVisible?"85%":"100%";if(typeof s.columns==="undefined")s.columns=O(F,s);if(typeof s.areTaskDependenciesVisible==="undefined")s.areTaskDependenciesVisible=false;if(typeof s.isBaselineVisible==="undefined")s.isBaselineVisible=false;if(typeof s.areStandardTaskLabelsVisible==="undefined")s.areStandardTaskLabelsVisible=false;if(typeof s.areMilestoneTaskLabelsVisible==="undefined")s.areMilestoneTaskLabelsVisible=
  false;if(typeof s.areAssignmentsReadOnly==="undefined")s.areAssignmentsReadOnly=false;if(typeof s.assignmentThumbStyle==="undefined")switch(s.theme){default:s.assignmentThumbStyle="fill: none; stroke: #3b87d9; stroke-width: 0.65px; stroke-dasharray: 2, 2";break;case "Aero":s.assignmentThumbStyle="fill: none; stroke: Blue; stroke-dasharray: 2, 2"}if(typeof s.temporaryAssignmentThumbStyle==="undefined")switch(s.theme){default:s.temporaryAssignmentThumbStyle="fill: none; stroke: #3b87d9; stroke-width: 0.65px; stroke-dasharray: 2, 2";
  break;case "Aero":s.temporaryAssignmentThumbStyle="fill: none; stroke: Blue; stroke-width: 0.65px; stroke-dasharray: 2, 2"}if(typeof s.assignmentThumbTemplate==="undefined")s.assignmentThumbTemplate=H(F,c,s);s.internalExtraTaskTemplate=s.assignmentThumbTemplate;ta(c,o,q,m);DlhSoft.Controls.GanttChartView.initialize(c,o,m,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");x(c,o);c.isScheduleChartInitializing=false;
  c.isScheduleChartInitialized=true;return c},R=function(c){U(c,c.scheduleChartItems,c.settings,c.license)},W=function(c){if(typeof c.useUpdatingToolTips==="undefined")c.useUpdatingToolTips=true;if(typeof c.target==="undefined")c.target="Standard";if(typeof c.theme==="undefined")c.theme="Modern";if(typeof c.isGridVisible==="undefined")switch(c.target){default:c.isGridVisible=true;break;case "Phone":c.isGridVisible=false}if(typeof c.interaction==="undefined")c.interaction=c.target!="Phone"?"Standard":
  "TouchEnabled";if(typeof c.isReadOnly==="undefined")c.isReadOnly=false;if(typeof c.isGridReadOnly==="undefined")c.isGridReadOnly=false;if(typeof c.isContentReadOnly==="undefined")c.isContentReadOnly=false;if(typeof c.selectionMode==="undefined")c.selectionMode="Focus";if(typeof c.isVirtualizing==="undefined")c.isVirtualizing=true;if(c.target=="Phone"&&typeof c.areTaskAssignmentsVisible==="undefined")c.areTaskAssignmentsVisible=false},O=function(c,o){typeof o!=="object"&&(o={});W(o);var m=[{header:"",
  width:32,isSelection:true},{header:"Resource",width:120,isTreeView:true}];m[0].cellTemplate=ka(o,m[0],c);m[1].cellTemplate=V(o,m[1],c);m[1].exportCellTemplate=V(o,m[1],c,false);o.selectionMode!="Single"&&(o.selectionMode!="Extended"&&o.selectionMode!="ExtendedFocus")&&m.splice(0,1);return m},ka=function(c,o){return function(c){return!o.isReadOnly?u(c):getBooleanNode(c.ganttChartView.ownerDocument,c.isSelected)}},u=function(p){var o=p.ganttChartView.ownerDocument,m;if(typeof p.selectionInput==="undefined"){m=
  o.createElement("input");p.selectionInput=m;m.type="checkbox";m.setAttribute("style","margin: 0px")}else m=p.selectionInput;if(p.isSelected){m.setAttribute("checked","checked");if(!m.checked)m.checked=true}else if(m.checked)m.checked=false;var q=function(){m.checked?ca(p):typeof p.scheduleChartView!=="undefined"&&p.scheduleChartView.unselectItem(p)};typeof m.changeEventListener!=="undefined"&&m.removeEventListener("change",m.changeEventListener,true);m.addEventListener("change",c(p.ganttChartView,
  m,"change",q,true),true);m.changeEventListener=q;o=function(c){if(c.keyCode==13){c.preventDefault();c.stopPropagation();q(c)}};typeof m.keyPressEventListener!=="undefined"&&m.removeEventListener("keypress",m.keyPressEventListener,true);m.addEventListener("keypress",c(p.ganttChartView,m,"keypress",o,true),true);m.keyPressEventListener=o;return m},ca=function(c){typeof c.scheduleChartView!=="undefined"&&c.scheduleChartView.selectItem(c)},L=function(c,o){if(typeof c.scheduleChartView!=="undefined")c.scheduleChartView.currentItem=
  c;(o.selectionMode=="Focus"||o.selectionMode=="ExtendedFocus")&&!c.isSelected&&ca(c)},V=function(c,o,m,q){var s=function(c){var p=c.content,c=c.ganttChartView.ownerDocument.createElement("span");c.innerHTML=p;return c};return(typeof q==="undefined"||q)&&!c.isReadOnly&&!c.isGridReadOnly&&!c.isContentReadOnly?function(m){return!o.isReadOnly&&(typeof m.isReadOnly==="undefined"||!m.isReadOnly)?X(m,Math.max(0,o.width-m.indentation*m.ganttChartView.settings.indentationLevelWidth-m.ganttChartView.settings.toggleButtonAreaWidth-
  16),c):s(m)}:s},X=function(p,o,m){var q=p.ganttChartView.ownerDocument,s;if(typeof p.contentInput==="undefined"){s=q.createElement("input");p.contentInput=s;s.type="text";s.addEventListener("focus",c(p.ganttChartView,s,"focus",function(){L(p,m)}));var x=function(){p.content=s.value;p.scheduleChartView.onItemPropertyChanged(p,"content",true,true);p.scheduleChartView.refreshItem(p)};typeof s.changeEventListener!=="undefined"&&s.removeEventListener("change",s.changeEventListener,true);s.addEventListener("change",
  c(p.ganttChartView,s,"change",x,true),true);s.changeEventListener=x;q=function(c){if(c.keyCode==13){c.preventDefault();c.stopPropagation();x(c)}};typeof s.keyPressEventListener!=="undefined"&&s.removeEventListener("keypress",s.keyPressEventListener,true);s.addEventListener("keypress",c(p.ganttChartView,s,"keypress",q,true),true);s.keyPressEventListener=q;s.addEventListener("focus",c(p.ganttChartView,s,"focus",function(){s.style.backgroundColor="White"}));s.addEventListener("blur",c(p.ganttChartView,
  s,"blur",function(){s.style.backgroundColor="Transparent"}))}else s=p.contentInput;s.value=p.content;q="";if(p.hasChildren&&(typeof p.isSummaryEnabled==="undefined"||p.isSummaryEnabled))q="; font-weight: bold";s.setAttribute("style","background-color: Transparent; width: "+o+"px; border-width: 0px; padding: 0px"+q);return s},H=function(p,o,m){return function(q){var s=q.ganttChartView.ownerDocument,x=s.createElementNS("http://www.w3.org/2000/svg","g");if(!m.isReadOnly&&!m.isChartReadOnly&&(typeof q.isReadOnly===
  "undefined"||!q.isReadOnly)&&!m.areAssignmentsReadOnly){var v=o.getChartPosition(q.start,m),z=Math.max(o.getChartPosition(q.finish,m),v+4),u=s.createElementNS("http://www.w3.org/2000/svg","line");u.setAttribute("x1",v);u.setAttribute("y1",m.barMargin+m.barHeight+2);u.setAttribute("x2",z-1);u.setAttribute("y2",m.barMargin+m.barHeight+2);var B=m.assignmentThumbClass;typeof B!=="undefined"&&u.setAttribute("class",B);u.setAttribute("style",m.assignmentThumbStyle);u.style.visibility="hidden";x.appendChild(u);
  s=s.createElementNS("http://www.w3.org/2000/svg","rect");s.setAttribute("x",v);s.setAttribute("y",m.barMargin+m.barHeight-2);s.setAttribute("width",Math.max(0,z-v-1));s.setAttribute("height",7);s.setAttribute("style","fill: White; fill-opacity: 0; cursor: move");s.addEventListener("mouseover",c(o,s,"mouseover",function(){if(typeof o.draggingItem==="undefined")u.style.visibility="visible"},true),true);s.addEventListener("mouseout",c(o,s,"mouseout",function(){u.style.visibility="hidden"},true),true);
  x.appendChild(s);J(s,x,q,v,z,p,o,m)}return x}},K=function(c){var o=c.scheduleChartView;c.itemTop=c.scheduleChartVisibilityIndex*o.settings.itemHeight;o.refreshGridItem(c);if(typeof c.ganttChartItems!=="undefined")for(var m=0;m<c.ganttChartItems.length;m++){var q=c.ganttChartItems[m];q.itemTop=c.itemTop;o.refreshChartItem(q)}},J=function(p,o,m,q,s,x,v,z){function u(c,x){delete v.cancelDrag;v.draggingItem=m;v.dragType="Assignment";v.style.cursor=p.style.cursor;v.draggingInitialY=c.clientY;v.draggingInitialThumbPosition=
  z.barMargin;o.itemLeft=q;o.itemRight=s;m.assignmentThumb=o;if(DlhSoft.Controls.ToolTip&&z.useUpdatingToolTips&&!x){(toolTip=DlhSoft.Controls.ToolTip.get(p))||(toolTip=DlhSoft.Controls.ToolTip.initialize(void 0,p,{duration:NaN,containerStyle:"cursor: default; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; border: 1px solid "+z.border+"; background-color: White; color: Black; font-family: Arial; font-size: 12px; padding: 4px; margin-top: 1px"},"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase."));
  toolTip.setContent(m.content+" \u2013");toolTip.show();toolTip.setPosition(toolTip.x+(s-q)+4,toolTip.y-z.itemHeight-1);toolTip.originalY=toolTip.y;v.toolTip=toolTip}}var B=m.ganttChartView.ownerDocument;p.addEventListener("mousedown",c(v,p,"mousedown",function(c){if(c.button==0){u(c);c.preventDefault()}},true),true);p.addEventListener("touchstart",c(v,p,"touchstart",function(c){u(c.touches[0],true);c.preventDefault()},true),true);if(typeof v.draggableAssignmentItems==="undefined")v.draggableAssignmentItems=
  [];for(var H=false,K=0;K<v.draggableAssignmentItems.length;K++)if(v.draggableAssignmentItems[K]==m){H=true;break}if(!H){var J=function(c,p){if(!(typeof v.draggingItem==="undefined"||v.draggingItem!=m||v.dragType!="Assignment")){var u=Math.ceil((c.clientY-v.draggingInitialY)/z.itemHeight)*z.itemHeight;ia(c.clientY,v);delete v.draggingItem;o=m.assignmentThumb;q=o.itemLeft;s=o.itemRight;if(typeof v.temporaryAssignmentThumb!=="undefined"){try{o.removeChild(v.temporaryAssignmentThumb)}catch(E){}delete v.temporaryAssignmentThumb}if(v.cancelDrag){delete v.cancelDrag;
  delete v.draggingItem;v.style.cursor="default"}else{var G;if(z.temporaryAssignmentThumbTemplate)G=z.temporaryAssignmentThumbTemplate(v,q,v.draggingInitialThumbPosition+u,Math.max(4,s-q-1),z.barHeight);else{G=B.createElementNS("http://www.w3.org/2000/svg","rect");G.setAttribute("x",q);G.setAttribute("y",v.draggingInitialThumbPosition+u);G.setAttribute("width",Math.max(4,s-q-1));G.setAttribute("height",z.barHeight);typeof z.temporaryAssignmentThumbClass!=="undefined"&&G.setAttribute("class",z.temporaryAssignmentThumbClass);
  G.setAttribute("style",z.temporaryAssignmentThumbStyle)}v.temporaryAssignmentThumb=G;o.appendChild(G);v.draggingItem=m;if(DlhSoft.Controls.ToolTip&&z.useUpdatingToolTips&&!p){toolTip=v.toolTip;G=Math.floor((m.itemTop+v.draggingInitialThumbPosition+u)/z.itemHeight);var H=null,K=0,L;for(L=0;L<x.length;L++){var J=x[L];if(J.isVisible&&!(typeof J.isHidden!=="undefined"&&J.isHidden)&&typeof J.displayRowIndex==="undefined"){if(K==G){J.hasChildren||(H=J);break}K++}}toolTip.setContent(m.content+" \u2013"+
  (H!=null?" "+H.content:""));toolTip.setVerticalPosition(Math.max(T(v)+v.chartHeaderContainer.clientHeight,toolTip.originalY+u));if(typeof toolTip.originalX==="undefined")toolTip.originalX=toolTip.x;toolTip.setHorizontalPosition(toolTip.originalX)}}}};v.addEventListener("mousemove",c(v,v,"mousemove",function(c){J(c)},true),true);v.addEventListener("touchmove",c(v,v,"touchmove",function(c){J(c.touches[0],true)},true),true);var R=function(c){if(!(typeof v.draggingItem==="undefined"||v.draggingItem!=
  m||v.dragType!="Assignment")){o=m.assignmentThumb;if(typeof v.temporaryAssignmentThumb!=="undefined"){try{o.removeChild(v.temporaryAssignmentThumb)}catch(p){}delete v.temporaryAssignmentThumb}var c=Math.ceil((c.clientY-v.draggingInitialY)/z.itemHeight)*z.itemHeight,c=Math.floor((m.itemTop+v.draggingInitialThumbPosition+c)/z.itemHeight),q=null,s=0,u;for(u=0;u<x.length;u++){var B=x[u];if(B.isVisible&&!(typeof B.isHidden!=="undefined"&&B.isHidden)&&typeof B.displayRowIndex==="undefined"){if(s==c){B.hasChildren||
  (q=B);break}s++}}if(q!=null){var s=m.scheduleChartItem,B=s.ganttChartItems,E=[];for(u=0;u<B.length;u++)B[u]!=m&&E.push(B[u]);s.ganttChartItems=E;v.onItemPropertyChanged(s,"ganttChartItems",false,true);if(typeof q.ganttChartItems==="undefined")q.ganttChartItems=[];q.ganttChartItems.push(m);v.onItemPropertyChanged(q,"ganttChartItems",true,true);m.scheduleChartItem=q;v.onItemPropertyChanged(m,"scheduleChartItem",true,true);m.displayRowIndex=c;m.isVirtuallyVisible=true;v.refreshChartItem(m);L(q,z)}delete v.draggingItem;
  v.style.cursor="default"}};B.addEventListener("mouseup",c(v,B,"mouseup",function(c){c.button==0&&R(c)},true),true);B.addEventListener("touchend",c(v,B,"touchend",function(c){R(c.changedTouches[0])},true),true);v.draggableAssignmentItems.push(m)}},T=function(c){var o=0;if(c.offsetParent){do{o=o+c.offsetTop;c=c.offsetParent}while(c)}return o},ia=function(c,o){if(typeof o.draggingItem!=="undefined"){var m=new Date;if(!o.lastDraggingTime||!(m>o.lastDraggingTime&&m-o.lastDraggingTime<200)){o.lastDraggingTime=
  m;var c=c-T(o),q,s;if(c<o.chartHeaderContainer.clientHeight+24){q=o.chartContentContainer.scrollTop;o.chartContentContainer.scrollTop=o.chartContentContainer.scrollTop-20;if(typeof o.isDuringVerticalScrolling==="undefined"){o.isDuringVerticalScrolling=true;setTimeout(function(){s=q-o.chartContentContainer.scrollTop;o.draggingInitialThumbPosition=o.draggingInitialThumbPosition-s;delete o.isDuringVerticalScrolling},0)}}else if(c>=o.chartHeaderContainer.clientHeight+o.chartContentContainer.clientHeight-
  24){q=o.chartContentContainer.scrollTop;o.chartContentContainer.scrollTop=o.chartContentContainer.scrollTop+20;if(typeof o.isDuringVerticalScrolling==="undefined"){o.isDuringVerticalScrolling=true;setTimeout(function(){s=o.chartContentContainer.scrollTop-q;o.draggingInitialThumbPosition=o.draggingInitialThumbPosition+s;delete o.isDuringVerticalScrolling},0)}}}}},da=function(c,o,m,q){var s=q.indexOf(c);if(!(s<0||o<0||o==s||o>=q.length)){q.splice(s,1);q.splice(o,0,c);R(m);typeof m.settings.itemMoveHandler!==
  "undefined"&&m.settings.itemMoveHandler(c,s,o)}},ta=function(c,o,m,q){for(var s=0;s<o.length;s++)o[s].scheduleChartView=c;c.scheduleChartItems=m;c.settings=q;c.refreshScheduleChartItem=K;c.initializeAssignmentDraggingThumb=function(m,o,q,s,x){J(m,o,q,s,x,c.items,c,c.settings)};c.insertScheduleChartItem=function(q,s){var x=q;s.scheduleChartView=c;s.isVirtuallyVisible=true;s.scheduleChartIndex=x;var u=0,B;for(B=0;B<x;B++)m[B].isHidden||u++;s.scheduleChartVisibilityIndex=u;s.isBarVisible=false;x=x<m.length?
  m[x].index:o.length;m.splice(s.scheduleChartIndex,0,s);c.insertItem(x++,s);if(typeof s.ganttChartItems!=="undefined")for(B=0;B<s.ganttChartItems.length;B++){u=s.ganttChartItems[B];u.scheduleChartView=c;u.scheduleChartItem=s;u.isHidden=s.isHidden;u.displayRowIndex=s.scheduleChartVisibilityIndex;u.indentation=s.indentation;c.insertItem(x++,u)}for(B=s.scheduleChartIndex+1;B<m.length;B++){x=m[B];x.scheduleChartIndex=B;typeof x.scheduleChartVisibilityIndex!=="undefined"&&x.scheduleChartVisibilityIndex++;
  if(typeof x.ganttChartItems!=="undefined")for(u=0;u<x.ganttChartItems.length;u++)x.ganttChartItems[u].displayRowIndex=x.scheduleChartVisibilityIndex;K(x)}};c.addScheduleChartItem=function(o){c.insertScheduleChartItem(m.length,o)};c.insertScheduleChartItems=function(m,o){for(var s=0;s<o.length;s++)c.insertScheduleChartItem(m++,o[s])};c.addScheduleChartItems=function(m){for(var o=0;o<m.length;o++)c.addScheduleChartItem(m[o])};c.removeScheduleChartItem=function(o){if(typeof o.ganttChartItems!=="undefined")for(var s=
  0;s<o.ganttChartItems.length;s++)c.removeItem(o.ganttChartItems[s]);m.splice(o.scheduleChartIndex,1);for(s=o.scheduleChartIndex;s<m.length;s++){var q=m[s];q.scheduleChartIndex=s;typeof q.scheduleChartVisibilityIndex!=="undefined"&&q.scheduleChartVisibilityIndex--;if(typeof q.ganttChartItems!=="undefined")for(var x=0;x<q.ganttChartItems.length;x++)q.ganttChartItems[x].displayRowIndex=q.scheduleChartVisibilityIndex;K(q)}c.removeItem(o)};c.removeScheduleChartItems=function(m){for(var o=0;o<m.length;o++)c.removeScheduleChartItem(m[o])};
  c.moveScheduleChartRange=function(o,s,q){if(!(o<0||q<0||q==o||q>m.length-s)){var x=[],u;for(u=o;u<o+s;u++)x.push(m[u]);m.splice(o,s);for(u=0;u<x.length;u++)m.splice(q+u,0,x[u]);R(c);if(typeof c.settings.itemMoveHandler!=="undefined")for(u=0;u<x.length;u++)c.settings.itemMoveHandler(x[u],o+u,q+u)}};c.moveScheduleChartItem=function(o,s){da(o,s,c,m)};c.moveScheduleChartItemUp=function(o){var s=m.indexOf(o);s<=0||da(o,s-1,c,m)};c.moveScheduleChartItemDown=function(o){var s=m.indexOf(o);s<0||s>=m.length-
  1||da(o,s+1,c,m)}},x=function(c,o){c.items=o;c.refresh=function(){R(c)}};return{initialize:U,refresh:R,getDefaultColumns:O,getDefaultScales:DlhSoft.Controls.GanttChartView.getDefaultScales,getDefaultStyleDefinitionTemplate:DlhSoft.Controls.GanttChartView.getDefaultStyleDefinitionTemplate,getDefaultStandardTaskTemplate:DlhSoft.Controls.GanttChartView.getDefaultStandardTaskTemplate,getDefaultMilestoneTaskTemplate:DlhSoft.Controls.GanttChartView.getDefaultMilestoneTaskTemplate,getDefaultItemTemplate:DlhSoft.Controls.GanttChartView.getDefaultItemTemplate,
  getDefaultAssignmentsTemplate:DlhSoft.Controls.GanttChartView.getDefaultAssignmentsTemplate,initializeTaskDraggingThumbs:DlhSoft.Controls.GanttChartView.initializeTaskDraggingThumbs,initializeDependencyDraggingThumb:DlhSoft.Controls.GanttChartView.initializeDependencyDraggingThumb,initializeAssignmentDraggingThumb:function(c,o,m,q,s){m.scheduleChartView.initializeAssignmentDraggingThumb(c,o,m,q,s)},getWorkingTime:DlhSoft.Controls.GanttChartView.getWorkingTime,getEffort:DlhSoft.Controls.GanttChartView.getEffort,
  getFinish:DlhSoft.Controls.GanttChartView.getFinish,getStart:DlhSoft.Controls.GanttChartView.getStart,getCompletion:DlhSoft.Controls.GanttChartView.getCompletion,getCompletedFinish:DlhSoft.Controls.GanttChartView.getCompletedFinish,textColumnTemplateBase:DlhSoft.Controls.GanttChartView.textColumnTemplateBase,textInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.textInputColumnTemplateBase,getOutputDate:DlhSoft.Controls.GanttChartView.getOutputDate,getInputDate:DlhSoft.Controls.GanttChartView.getInputDate}}());
  void 0==DlhSoft.Controls.LoadChartView&&(DlhSoft.Controls.LoadChartView=function(){var c=function(c,p,o,m,q){c.internalEventListeners&&c.internalEventListeners.push({object:p,event:o,handler:m,useCapture:q});return m},U=function(c,p,o,m){var q=["DlhSoft.Controls","LoadChartView","DlhSoft.ProjectData.GanttChart.HTML.Controls","5","validate","Licensing"];DlhSoft[q[5]][q[4]](c,q[0],q[1],q[2],q[3],m,o);c.isLoadChartInitializing=true;for(var m=p,p=[],s=q=0,u=0;u<m.length;u++){var v=m[u];if(typeof v.isExported!==
  "undefined"&&v.isExported)p.push(v);else if(!(typeof v.loadChartItem!=="undefined"&&v.loadChartItem!=v)){v.loadChartIndex=v.scheduleChartIndex=q++;if(!v.isHidden)v.scheduleChartVisibilityIndex=s++;v.isBarVisible=false;p.push(v);if(typeof v.ganttChartItems!=="undefined")for(var z=0;z<v.ganttChartItems.length;z++){var E=v.ganttChartItems[z];E.loadChartItem=E.scheduleChartItem=v;if(v.isHidden)E.isHidden=true;E.displayRowIndex=v.scheduleChartVisibilityIndex;E.indentation=v.indentation+(v.indentation?
  v.indentation:0);p.push(E)}}}typeof o!=="object"&&(o={});DlhSoft.Controls.GanttChartView.initializeItems(p,o);q=o;s=p;W(q);if(typeof q.gridWidth==="undefined")q.gridWidth="15%";if(typeof q.chartWidth==="undefined")q.chartWidth=q.isGridVisible?"85%":"100%";if(typeof q.columns==="undefined")q.columns=O(s,q);if(typeof q.normalAllocationBarStyle==="undefined"&&q.normalAllocationBarClass==null)switch(q.theme){default:q.normalAllocationBarStyle="fill: Blue; fill-opacity: 0.8; stroke: Blue; stroke-width: 0.65px";
  break;case "Aero":q.normalAllocationBarStyle="fill: Blue; stroke: Blue"}if(typeof q.underAllocationBarStyle==="undefined"&&q.underAllocationBarClass==null)switch(q.theme){default:q.underAllocationBarStyle="fill: Blue; fill-opacity: 0.8; stroke: Blue; stroke-width: 0.65px";break;case "Aero":q.underAllocationBarStyle="fill: Blue; stroke: Blue"}if(typeof q.overAllocationBarStyle==="undefined"&&q.overAllocationBarClass==null)switch(q.theme){default:q.overAllocationBarStyle="fill: Red; fill-opacity: 0.8; stroke: Red; stroke-width: 0.65px";
  break;case "Aero":q.overAllocationBarStyle="fill: Red; stroke: Red"}if(typeof q.maxDisplayedUnits==="undefined")q.maxDisplayedUnits=1.5;if(typeof q.allocationTemplate==="undefined")q.allocationTemplate=K();q.standardTaskTemplate=q.allocationTemplate;q.milestoneTaskTemplate=q.allocationTemplate;q.areTaskDependenciesVisible=false;q.isBaselineVisible=false;q.isTaskCompletedEffortVisible=false;q.areTaskAssignmentsVisible=false;da(c,p,m,o);DlhSoft.Controls.GanttChartView.initialize(c,p,o,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.");
  ta(c,p,o);c.isLoadChartInitializing=false;c.isLoadChartInitialized=true;return c},R=function(c){U(c,c.loadChartItems,c.settings,c.license)},W=function(c){if(typeof c.target==="undefined")c.target="Standard";if(typeof c.theme==="undefined")c.theme="Modern";if(typeof c.isGridVisible==="undefined")switch(c.target){default:c.isGridVisible=true;break;case "Phone":c.isGridVisible=false}if(typeof c.isReadOnly==="undefined")c.isReadOnly=true;if(typeof c.selectionMode==="undefined")c.selectionMode="Focus";
  if(typeof c.isVirtualizing==="undefined")c.isVirtualizing=true},O=function(c,p){typeof p!=="object"&&(p={});W(p);var o=[{header:"",width:32,isSelection:true},{header:"Resource",width:120,isTreeView:true}];o[0].cellTemplate=ka(p,o[0],c);o[1].cellTemplate=L(p,o[1]);o[1].exportCellTemplate=L(p,o[1],false);p.selectionMode!="Single"&&(p.selectionMode!="Extended"&&p.selectionMode!="ExtendedFocus")&&o.splice(0,1);return o},ka=function(c,p){return function(c){return!p.isReadOnly?u(c):getBooleanNode(c.ganttChartView.ownerDocument,
  c.isSelected)}},u=function(x){var p=x.ganttChartView.ownerDocument,o;if(typeof x.selectionInput==="undefined"){o=p.createElement("input");x.selectionInput=o;o.type="checkbox";o.setAttribute("style","margin: 0px")}else o=x.selectionInput;if(x.isSelected){o.setAttribute("checked","checked");if(!o.checked)o.checked=true}else if(o.checked)o.checked=false;var m=function(){o.checked?ca(x):typeof x.loadChartView!=="undefined"&&x.loadChartView.unselectItem(x)};typeof o.changeEventListener!=="undefined"&&
  o.removeEventListener("change",o.changeEventListener,true);o.addEventListener("change",c(x.ganttChartView,o,"change",m,true),true);o.changeEventListener=m;p=function(c){if(c.keyCode==13){c.preventDefault();c.stopPropagation();m(c)}};typeof o.keyPressEventListener!=="undefined"&&o.removeEventListener("keypress",o.keyPressEventListener,true);o.addEventListener("keypress",c(x.ganttChartView,o,"keypress",p,true),true);o.keyPressEventListener=p;return o},ca=function(c){typeof c.loadChartView!=="undefined"&&
  c.loadChartView.selectItem(c)},L=function(c,p,o){var m=function(c){var m=c.content,c=c.ganttChartView.ownerDocument.createElement("span");c.innerHTML=m;return c};return(typeof o==="undefined"||o)&&!c.isReadOnly&&!c.isGridReadOnly&&!c.isContentReadOnly?function(o){return!p.isReadOnly&&(typeof o.isReadOnly==="undefined"||!o.isReadOnly)?V(o,Math.max(0,p.width-2),c):m(o)}:m},V=function(x,p,o){var m=x.ganttChartView.ownerDocument,q;if(typeof x.contentInput==="undefined"){q=m.createElement("input");x.contentInput=
  q;q.type="text";q.addEventListener("focus",c(x.ganttChartView,q,"focus",function(){if(typeof x.loadChartView!=="undefined")x.loadChartView.currentItem=x;(o.selectionMode=="Focus"||o.selectionMode=="ExtendedFocus")&&!x.isSelected&&ca(x)}));var s=function(){x.content=q.value;x.loadChartView.onItemPropertyChanged(x,"content",true,true);x.loadChartView.refreshItem(x)};typeof q.changeEventListener!=="undefined"&&q.removeEventListener("change",q.changeEventListener,true);q.addEventListener("change",c(x.ganttChartView,
  q,"change",s,true),true);q.changeEventListener=s;m=function(c){if(c.keyCode==13){c.preventDefault();c.stopPropagation();s(c)}};typeof q.keyPressEventListener!=="undefined"&&q.removeEventListener("keypress",q.keyPressEventListener,true);q.addEventListener("keypress",c(x.ganttChartView,q,"keypress",m,true),true);q.keyPressEventListener=m;q.addEventListener("focus",c(x.ganttChartView,q,"focus",function(){q.style.backgroundColor="White"}));q.addEventListener("blur",c(x.ganttChartView,q,"blur",function(){q.style.backgroundColor=
  "Transparent"}))}else q=x.contentInput;q.value=x.content;q.setAttribute("style","background-color: Transparent; width: "+p+"px; border-width: 0px; padding: 0px");return q},X=function(c){for(var p=0,o=0;o<c.length;o++)p=p+c[o].width;return p},H=function(c){var p=c.loadChartView;c.itemTop=c.scheduleChartVisibilityIndex*p.settings.itemHeight;p.refreshGridItem(c);if(typeof c.ganttChartItems!=="undefined")for(var o=0;o<c.ganttChartItems.length;o++){var m=c.ganttChartItems[o];m.itemTop=c.itemTop;p.refreshChartItem(m)}},
  K=function(c,p,o){return function(c){var q=typeof p!=="undefined"?p:c.loadChartView,s=typeof o!=="undefined"?o:q.settings,x=q.ownerDocument,v;v=q.ownerDocument;if(typeof c.chartItemArea==="undefined")c.chartItemArea=v.createElementNS("http://www.w3.org/2000/svg","g");for(v=c.chartItemArea.childNodes.length;v-- >0;)c.chartItemArea.removeChild(c.chartItemArea.childNodes[v]);v=c.chartItemArea;var u=q.getChartPosition(c.start,s),q=Math.max(q.getChartPosition(c.finish,s),u+4),x=x.createElementNS("http://www.w3.org/2000/svg",
  "rect"),E=typeof c.units!=="undefined"?c.units:1,B=Math.min(E,s.maxDisplayedUnits)/s.maxDisplayedUnits*s.barHeight;x.setAttribute("x",u);x.setAttribute("y",s.barMargin+(s.barHeight-B));x.setAttribute("width",Math.max(0,q-u-1));x.setAttribute("height",B);u=E==1?s.normalAllocationBarClass:E<1?s.underAllocationBarClass:s.overAllocationBarClass;if(typeof c.allocationBarClass!=="undefined")u=c.allocationBarClass;if(typeof u!=="undefined")x.setAttribute("class",u);else{s=E==1?s.normalAllocationBarStyle:
  E<1?s.underAllocationBarStyle:s.overAllocationBarStyle;if(typeof c.allocationBarStyle!=="undefined")s=c.allocationBarStyle;typeof s!=="undefined"&&x.setAttribute("style",s)}v.appendChild(x);return v}},J=function(c,p,o,m){var q=m.indexOf(c);if(!(q<0||p<0||p==q||p>=m.length)){m.splice(q,1);m.splice(p,0,c);R(o);typeof o.settings.itemMoveHandler!=="undefined"&&o.settings.itemMoveHandler(c,q,p)}},T=function(c,p){for(var o in p)o.indexOf("custom")!=0&&o.indexOf("description")!=0||typeof c[o]==="undefined"&&
  (c[o]=p[o])},ia=function(c,p,o,m,q,s,u,v,z,E,B,H,L,K,J,R,C){var S,U=[],G;if(typeof m!=="undefined")for(S=0;S<m.length;S++){G=C.columns[m[S]];U.push({isTreeView:G.isTreeView,header:G.header,width:G.width,headerClass:G.headerClass,headerStyle:G.headerStyle,cellClass:G.cellClass,cellStyle:G.cellStyle,cellTemplate:typeof G.exportCellTemplate!=="undefined"?G.exportCellTemplate:G.cellTemplate})}else for(S=0;S<C.columns.length;S++){G=C.columns[S];G.isSelection||U.push({isTreeView:G.isTreeView,header:G.header,
  width:G.width,headerClass:G.headerClass,headerStyle:G.headerStyle,cellClass:G.cellClass,cellStyle:G.cellStyle,cellTemplate:typeof G.exportCellTemplate!=="undefined"?G.exportCellTemplate:G.cellTemplate})}if(typeof o==="undefined")o=C.isGridVisible;S=o?X(U)+1:0;if(typeof q!=="undefined"){if(typeof u==="undefined"||!u)q=new Date(q.valueOf()-q.getTimezoneOffset()*6E4)}else q=C.timelineStart;if(typeof s!=="undefined"){if(typeof u==="undefined"||!u)s=new Date(s.valueOf()-s.getTimezoneOffset()*6E4)}else s=
  C.timelineFinish;q={isExport:true,isReadOnly:true,selectionMode:"None",isVirtualizing:false,isGridVisible:o,isSplitterEnabled:false,gridWidth:S+"px",columns:U,allowUserToResizeColumns:false,isGridRowClickTimeScrollingEnabled:false,isMouseWheelZoomEnabled:false,timelineStart:q,timelineFinish:s,hourWidth:typeof v!=="undefined"?v:C.hourWidth,displayedTime:typeof q!=="undefined"?q:C.timelineStart,currentTime:C.currentTime,isTaskToolTipVisible:false,isDependencyToolTipVisible:false,areTaskDependenciesVisible:false,
  isBaselineVisible:false,isTaskCompletedEffortVisible:false,areTaskAssignmentsVisible:false,containerClass:C.containerClass,containerStyle:C.containerStyle,border:C.border,theme:C.theme,headerBackground:C.headerBackground,headerHeight:C.headerHeight,itemHeight:C.itemHeight,itemClass:C.itemClass,itemStyle:C.itemStyle,indentationLevelWidth:C.indentationLevelWidth,toggleButtonClass:C.toggleButtonClass,toggleButtonStyle:C.toggleButtonStyle,scales:[],visibleWeekStart:C.visibleWeekStart,visibleWeekFinish:C.visibleWeekFinish,
  workingWeekStart:C.workingWeekStart,workingWeekFinish:C.workingWeekFinish,visibleDayStart:C.visibleDayStart,visibleDayFinish:C.visibleDayFinish,specialNonworkingDays:C.specialNonworkingDays,barMargin:C.barMargin,barHeight:C.barHeight,normalAllocationBarClass:C.normalAllocationBarClass,underAllocationBarClass:C.underAllocationBarClass,overAllocationBarClass:C.overAllocationBarClass,normalAllocationBarStyle:C.normalAllocationBarStyle,underAllocationBarStyle:C.underAllocationBarStyle,overAllocationBarStyle:C.overAllocationBarStyle,
  alternativeItemClass:C.alternativeItemClass,alternativeChartItemClass:C.alternativeChartItemClass,alternativeItemStyle:C.alternativeItemStyle,alternativeChartItemStyle:C.alternativeChartItemStyle,gridLines:C.gridLines,horizontalGridLines:C.horizontalGridLines,verticalGridLines:C.verticalGridLines,horizontalChartLines:C.horizontalChartLines,target:C.target,months:C.months,daysOfWeek:C.daysOfWeek,weekStartDay:C.weekStartDay,dateFormatter:C.dateFormatter,dateTimeFormatter:C.dateTimeFormatter,isRelativeToTimezone:C.isRelativeToTimezone,
  allocationTemplate:C.allocationTemplate};q.timelineStart=DlhSoft.Controls.GanttChartView.getWeekStart(q.timelineStart,q.weekStartDay);q.timelineFinish=DlhSoft.Controls.GanttChartView.getWeekFinish(q.timelineFinish,q.weekStartDay);J=(J.getChartPosition(q.timelineFinish)-J.getChartPosition(q.timelineStart))/J.settings.hourWidth*q.hourWidth;q.chartWidth=J+"px";var V=S+J+2+(o?1:0);for(S=0;S<C.scales.length;S++){o=C.scales[S];q.scales.push({scaleType:o.scaleType,isHeaderVisible:o.isHeaderVisible,headerHeight:o.headerHeight,
  headerTextFormat:o.headerTextFormat,headerClass:o.headerClass,headerStyle:o.headerStyle,isHighlightingVisible:o.isHighlightingVisible,highlightingClass:o.highlightingClass,highlightingStyle:o.highlightingStyle,isSeparatorVisible:o.isSeparatorVisible,separatorClass:o.separatorClass,separatorStyle:o.separatorStyle,intervals:o.intervals})}var O,W,da=false;if(B!=null&&typeof B.createElement!=="undefined")O=B;else{if(B!=null&&typeof B.focus!=="undefined")W=B;else{W=window.open("",B!=null?B:"_blank",typeof H!==
  "undefined"&&H&&(typeof K==="undefined"||K)?"width=800,height=640,location=no,menubar=no,toolbar=no,status=no,scrollbars=yes":"");da=true}O=W.document;try{var ca=document.head.getElementsByTagName("link");for(S=0;S<ca.length;S++){var ia=ca[S],ka=O.adoptNode(ia.cloneNode(true));ka.href=ia.href;O.head.appendChild(ka)}}catch(ta){}}O.title=typeof c!=="undefined"?c:"Exported chart"+(typeof H!=="undefined"&&H?" (printable)":"");typeof z==="undefined"&&(z=0);typeof E==="undefined"&&(E=R.length-1);c=[];for(S=
  ca=0;S<R.length;S++){B=R[S];if(!(typeof B.displayRowIndex!=="undefined"&&(B.displayRowIndex<z||B.displayRowIndex>E)||typeof B.displayRowIndex==="undefined"&&(ca++<z||ca>E+1))){C={content:B.content,indentation:B.indentation,start:B.start,finish:B.finish,units:B.units,isBarVisible:B.isBarVisible,isRelativeToTimezone:B.isRelativeToTimezone,"class":B["class"],style:B.style,barClass:B.barClass,barStyle:B.barStyle,isSummaryEnabled:B.isSummaryEnabled,isParentSummarizationEnabled:B.isParentSummarizationEnabled,
  isHidden:B.isHidden,isExported:true,tag:B};if(typeof B.displayRowIndex!=="undefined")C.displayRowIndex=B.displayRowIndex-z;T(C,B);c.push(C);B.exportItem=C}}var Oa=O.createElement("p");Oa.innerHTML=typeof p!=="undefined"?p:"";O.body.appendChild(Oa);var ea=O.createElement("div");ea.setAttribute("style","width: "+V+"px");try{DlhSoft.Controls.LoadChartView.initialize(ea,c,q,"DlhSoft.Controls: DlhSoft internal usage only. Customers may purchase standard product usage licenses from http://DlhSoft.com/Purchase.")}catch(Ma){}setTimeout(function(){da&&
  O.body.setAttribute("style","margin: 0px");var c=O.createElement("div");c.appendChild(ea);O.body.replaceChild(c,Oa);if(L){c.setAttribute("style","width: "+ea.offsetHeight+"px; height: "+V+"px; overflow: hidden");c=Math.round((ea.offsetWidth-ea.offsetHeight)/2);ea.setAttribute("style","width: "+V+"px; transform: rotate(90deg) translateX("+c+"px) translateY("+c+"px); -webkit-transform: rotate(90deg) translateX("+c+"px) translateY("+c+"px)")}O.close();if(typeof W!==void 0){W.focus();if(typeof H!=="undefined"&&
  H){W.print();(typeof K==="undefined"||K)&&setTimeout(function(){W.close()})}}},0)},da=function(c,p,o,m){for(var q=0;q<p.length;q++)p[q].loadChartView=p[q].scheduleChartView=c;c.loadChartItems=c.scheduleChartItems=o;c.settings=m;c.refreshLoadChartItem=H;c.insertLoadChartItem=function(m,q){var v=m;q.loadChartView=q.scheduleChartView=c;q.isVirtuallyVisible=true;q.loadChartIndex=q.scheduleChartIndex=v;var u=0,E;for(E=0;E<v;E++)o[E].isHidden||u++;q.scheduleChartVisibilityIndex=u;q.isBarVisible=false;v=
  v<o.length?o[v].index:p.length;o.splice(q.loadChartIndex,0,q);c.insertItem(v++,q);if(typeof q.ganttChartItems!=="undefined")for(E=0;E<q.ganttChartItems.length;E++){u=q.ganttChartItems[E];u.loadChartView=u.scheduleChartView=c;u.loadChartItem=u.scheduleChartItem=q;u.isHidden=q.isHidden;u.displayRowIndex=q.scheduleChartVisibilityIndex;u.indentation=q.indentation;c.insertItem(v++,u)}for(E=q.loadChartIndex+1;E<o.length;E++){v=o[E];v.loadChartIndex=v.scheduleChartIndex=E;typeof v.scheduleChartVisibilityIndex!==
  "undefined"&&v.scheduleChartVisibilityIndex++;if(typeof v.ganttChartItems!=="undefined")for(u=0;u<v.ganttChartItems.length;u++)v.ganttChartItems[u].displayRowIndex=v.scheduleChartVisibilityIndex;H(v)}};c.addLoadChartItem=function(m){c.insertLoadChartItem(o.length,m)};c.insertLoadChartItems=function(o,m){for(var p=0;p<m.length;p++)c.insertLoadChartItem(o++,m[p])};c.addLoadChartItems=function(o){for(var m=0;m<o.length;m++)c.addLoadChartItem(o[m])};c.removeLoadChartItem=function(m){if(typeof m.ganttChartItems!==
  "undefined")for(var p=0;p<m.ganttChartItems.length;p++)c.removeItem(m.ganttChartItems[p]);c.removeItem(m);o.splice(m.loadChartIndex,1);for(m=m.loadChartIndex;m<o.length;m++){p=o[m];p.loadChartIndex=p.scheduleChartIndex=m;typeof p.scheduleChartVisibilityIndex!=="undefined"&&p.scheduleChartVisibilityIndex--;if(typeof p.ganttChartItems!=="undefined")for(var q=0;q<p.ganttChartItems.length;q++)p.ganttChartItems[q].displayRowIndex=p.scheduleChartVisibilityIndex;H(p)}};c.removeLoadChartItems=function(o){for(var m=
  0;m<o.length;m++)c.removeLoadChartItem(o[m])};c.moveLoadChartRange=function(m,p,q){if(!(m<0||q<0||q==m||q>o.length-p)){var u=[],E;for(E=m;E<m+p;E++)u.push(o[E]);o.splice(m,p);for(E=0;E<u.length;E++)o.splice(q+E,0,u[E]);R(c);if(typeof c.settings.itemMoveHandler!=="undefined")for(E=0;E<u.length;E++)c.settings.itemMoveHandler(u[E],m+E,q+E)}};c.moveLoadChartItem=function(m,p){J(m,p,c,o)};c.moveLoadChartItemUp=function(m){var p=o.indexOf(m);p<=0||J(m,p-1,c,o)};c.moveLoadChartItemDown=function(m){var p=
  o.indexOf(m);p<0||p>=o.length-1||J(m,p+1,c,o)}},ta=function(c,p,o){c.items=p;c.refresh=function(){R(c)};c.exportContent=function(m,q){typeof m==="undefined"&&(m={});ia(m.title,m.preparingMessage,m.isGridVisible,m.columnIndexes,m.timelineStart,m.timelineFinish,m.isRelativeToTimezone,m.hourWidth,m.startRowIndex,m.endRowIndex,q,false,m.rotate,false,c,p,o)};c.print=function(m){typeof m==="undefined"&&(m={});ia(m.title,m.preparingMessage,m.isGridVisible,m.columnIndexes,m.timelineStart,m.timelineFinish,
  m.isRelativeToTimezone,m.hourWidth,m.startRowIndex,m.endRowIndex,null,true,m.rotate,m.autoClose,c,p,o)}};return{initialize:U,refresh:R,getDefaultColumns:O,getDefaultScales:DlhSoft.Controls.GanttChartView.getDefaultScales,getDefaultAllocationTemplate:K,getDefaultItemTemplate:DlhSoft.Controls.GanttChartView.getDefaultItemTemplate,getWorkingTime:DlhSoft.Controls.GanttChartView.getWorkingTime,textColumnTemplateBase:DlhSoft.Controls.GanttChartView.textColumnTemplateBase,textInputColumnTemplateBase:DlhSoft.Controls.GanttChartView.textInputColumnTemplateBase,
  getOutputDate:DlhSoft.Controls.GanttChartView.getOutputDate,getInputDate:DlhSoft.Controls.GanttChartView.getInputDate}}());
  